Skip to content

Commit

Permalink
Merge pull request #2642 from alphagov/remove-support-ie8
Browse files Browse the repository at this point in the history
Remove IE8-10 scripts, styles, comments, polyfills etc
  • Loading branch information
colinrotherham authored Mar 13, 2023
2 parents 8c2842c + bb9b72a commit 78f1877
Show file tree
Hide file tree
Showing 41 changed files with 274 additions and 952 deletions.
15 changes: 11 additions & 4 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
last 2 versions
ie 8
ie 9
iOS 9
# This list builds on the GOV.UK service manual's browser testing recommendations
# https://www.gov.uk/service-manual/technology/designing-for-different-browsers-and-devices

> 0.1%
last 2 Chrome versions
last 2 Firefox versions
last 2 Edge versions
last 2 Samsung versions
Safari >= 9
ie 11
iOS >= 9

[node]
node 18
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ updates:
- dependency-name: puppeteer
update-types: ['version-update:semver-major']

# Always ignore legacy packages
- dependency-name: iframe-resizer
- dependency-name: rollup

# Update GitHub Actions
- package-ecosystem: github-actions
directory: /
Expand Down
9 changes: 0 additions & 9 deletions .htmlvalidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,6 @@ module.exports = {
h1: {
permittedContent: ['div', 'label', 'span']
},
// "frameborder" is required for IE8 support
// https://github.com/alphagov/govuk-design-system/pull/116
iframe: {
attributes: {
frameborder: {
deprecated: false
}
}
},
// We added a summary to fix an accessibility issue, though we could
// probably revisit.
// https://github.com/alphagov/govuk-design-system/pull/301
Expand Down
10 changes: 0 additions & 10 deletions config/modernizr.json

This file was deleted.

16 changes: 1 addition & 15 deletions lib/metalsmith.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const extractPageHeadings = require('../lib/extract-page-headings/index.js') //
const generateSitemap = require('./generate-sitemap.js') // generate sitemap
const { hashAssets } = require('./fingerprints') // rename files with hash fingerprints
const lunr = require('./metalsmith-lunr-index') // generate search index
const modernizrBuild = require('./modernizr-build.js') // modernizr build plugin
const navigation = require('./navigation.js') // navigation plugin
const rollup = require('./rollup') // used to build GOV.UK Frontend JavaScript
const titleChecker = require('./metalsmith-title-checker.js')
Expand Down Expand Up @@ -139,7 +138,7 @@ module.exports = metalsmith(path.resolve(__dirname, '../'))
dest: 'assets'
}),

copyAssets('**/{ie8.polyfils,iframeResizer.contentWindow}.@(map|min.js)', {
copyAssets('**/iframeResizer.contentWindow.@(map|min.js)', {
cwd: path.join(paths.nodemodules, 'iframe-resizer/js'),
dest: 'javascripts/vendor'
})
Expand All @@ -148,22 +147,9 @@ module.exports = metalsmith(path.resolve(__dirname, '../'))
done()
})

// build custom modernizr.js file
.use(modernizrBuild({
config: path.normalize('../config/modernizr.json'),
destination: path.normalize('javascripts/vendor/'),
filename: 'modernizr.js'
}))

// build the entrypoint for the IE8 JavaScript that goes in the <head>
.use(rollup('javascripts/head-ie8.mjs'))

// build the entrypoint for application specific JavaScript
.use(rollup('javascripts/application.mjs'))

// build the entrypoint for application IE8 specific JavaScript
.use(rollup('javascripts/application-ie8.mjs'))

// build GOV.UK Frontend JavaScript
.use(rollup('javascripts/govuk-frontend.mjs'))

Expand Down
29 changes: 0 additions & 29 deletions lib/modernizr-build.js

This file was deleted.

4 changes: 0 additions & 4 deletions lib/rollup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ const plugin = (modulePath, moduleName) => async (files, metalsmith, done) => {
// Self-executing function, suitable for <script> tags
format: 'iife',

// Legacy mode is required for IE8 support
legacy: true,

// Used to set the `window` global for 'iife' and 'umd' bundles
name: moduleName
})
Expand All @@ -59,7 +56,6 @@ const plugin = (modulePath, moduleName) => async (files, metalsmith, done) => {

// Compatibility workarounds
ecma: 5,
ie8: true,
safari10: true
})

Expand Down
Loading

0 comments on commit 78f1877

Please sign in to comment.