Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist JavaScript throws syntax errors in IE8 #1033

Closed
NickColley opened this issue Oct 16, 2018 · 2 comments
Closed

dist JavaScript throws syntax errors in IE8 #1033

NickColley opened this issue Oct 16, 2018 · 2 comments
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation)

Comments

@NickColley
Copy link
Contributor

NickColley commented Oct 16, 2018

While investigating why the Design System throws errors in IE8 that we don't see in the review application I tried using the built dist and found it fails in IE8.

When copy and pasting https://github.com/alphagov/govuk-frontend/blob/master/dist/govuk-frontend-2.2.0.min.js into JSBin and running it in IE8 browser stack I get the following error:

'prototype' is null or not an object

){n(t.prototype,i,function(){var t,a=this,s="__defineGetter__DEFINE_PROPERTY"+i

Seems to be around the defineProperty polyfill, I'm doing more investigation into why rollup is behaving differently.

The JavaScript compiling seems to be the same, with just the destination changing: https://github.com/alphagov/govuk-frontend/blob/master/tasks/gulp/compile-assets.js#L101

@NickColley NickColley added the 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) label Oct 16, 2018
@NickColley
Copy link
Contributor Author

I believe the review application does not run an uglifier, and the Design System and dist files are both uglified, so this could be the cause.

@NickColley
Copy link
Contributor Author

In the Design System setting the uglify option ie8: true solved this issue, so likely will here, will do a PR when I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation)
Projects
None yet
Development

No branches or pull requests

1 participant