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

[WIP] feat(core): add -noPolyfill option to grunt build #1968

Closed
wants to merge 1 commit into from

Conversation

straker
Copy link
Contributor

@straker straker commented Jan 6, 2020

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)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker straker requested a review from a team as a code owner January 6, 2020 21:37
Copy link
Member

@stephenmathieson stephenmathieson left a 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 🙃

@WilcoFiers WilcoFiers changed the title feat(core): version of axe without polyfills feat(core): add -noPolyfill build option to grunt build Jan 9, 2020
@WilcoFiers WilcoFiers changed the title feat(core): add -noPolyfill build option to grunt build feat(core): add -noPolyfill option to grunt build Jan 9, 2020
Copy link
Contributor

@WilcoFiers WilcoFiers left a 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.

@WilcoFiers
Copy link
Contributor

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() {
Copy link
Contributor

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') {
Copy link
Contributor

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

Copy link
Member

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

@straker straker changed the title feat(core): add -noPolyfill option to grunt build [WIP] feat(core): add -noPolyfill option to grunt build Jan 22, 2020
@straker straker closed this Feb 27, 2020
@WilcoFiers WilcoFiers deleted the noPolyfills branch July 17, 2020 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants