-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Remove redundant "use strict" #1473
Comments
That's actually a good idea, thanks Michael! In the generated bundle it's enough to have just one |
In ECMAScript 2015 modules are strict by default, but one person did an experiment two years ago using node v6 and v8 that showed modules were not strict by default, since they still used the You can also add And finally, here are some methods to check if strict mode is active: https://stackoverflow.com/questions/10480108/is-there-any-way-to-check-if-strict-mode-is-enforced |
The |
Not sure. I guess we'll have to experiment. |
FYI: I've merged |
I've removed all occurrences of |
Perfect! |
In the webpack bundle, dist/math.js, there are 372 declarations of
"use strict";
.I suggest that somehow a single
"use strict";
be used at the top of the file instead, as this would reduce the size of the file by over 4800 characters.This change might be a problem if some of the bundled modules need to run in 'sloppy mode', but that is highly unlikely.
Making this change would also make dist/math.js compatible with Qt QML, see #1454.
Unfortunately, I am not able to work on this myself at this time.
The text was updated successfully, but these errors were encountered: