-
Notifications
You must be signed in to change notification settings - Fork 776
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
[WIP] feat(core): add -noPolyfill option to grunt build
#1968
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but let's wait for @WilcoFiers.
Also, I just noticed the "pollyfills" spelling 🙃
grunt build
grunt build
grunt build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, updated the title for it though, that wasn't the best.
Having the build option doesn't fully resolve the issue. We should have these no-poly files published to NPM (and included in sri-history.json) |
'index.js' | ||
); | ||
|
||
async function run() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a clone of imports-generator
- https://github.com/dequelabs/axe-core/blob/develop/build/imports-generator.js
I see no reason it has to be though. You should make this a common function, that when given a source and destination and the namespace to mount, it creates these files.
Why have two files with the same code one for creating axe.imports
and one for creating axe.polyfills
?
- Object.assign | ||
- Array.prototype.find | ||
*/ | ||
if (typeof Object.assign !== 'function') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another thought is, given we have core-js
already above for reduce
, can we remove the copy pasted polyfills below and swap them out to features from core-js
Eg: core-js(-pure)/es|stable|features/object/assign
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree here, but don't think that needs to change for this PR to land
grunt build
grunt build
Reduces the file size of axe from 893KB to 731KB unminified, and 450KB to 384KB minified.
Partially closes issue: #1935
Reviewer checks
Required fields, to be filled out by PR reviewer(s)