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

Build: Add rollup-plugin-polyfill-node #10249

Merged
merged 13 commits into from Feb 8, 2021

Conversation

fisker
Copy link
Member

@fisker fisker commented Feb 5, 2021

Description

rollup-plugin-node-globals is blocking us use new syntax, rollup/rollup#2881

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker fisker marked this pull request as ready for review February 5, 2021 03:34
Copy link
Member

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: bundle size diff main vs fisker:rollup-plugin-node-polyfills

 index.js........................................................1.7 MB    DONE  
 doc.js..........................................................125 kB    DONE  
-standalone.js...................................................522 kB    DONE  
+standalone.js...................................................529 kB    DONE  
 bin-prettier.js.................................................448 kB    DONE  
 third-party.js..................................................290 kB    DONE  
-parser-babel.js.....................................348 kB, esm 347 kB    DONE  
+parser-babel.js.....................................348 kB, esm 348 kB    DONE  
 parser-flow.js....................................3.09 MB, esm 3.09 MB    DONE  
-parser-typescript.js..............................3.08 MB, esm 3.08 MB    DONE  
-parser-espree.js....................................224 kB, esm 224 kB    DONE  
-parser-meriyah.js...................................196 kB, esm 196 kB    DONE  
-parser-angular.js.................................88.1 kB, esm 87.9 kB    DONE  
+parser-typescript.js..............................3.09 MB, esm 3.09 MB    DONE  
+parser-espree.js....................................225 kB, esm 225 kB    DONE  
+parser-meriyah.js...................................197 kB, esm 197 kB    DONE  
+parser-angular.js.................................88.1 kB, esm 87.8 kB    DONE  
 parser-postcss.js...............................................227 kB    DONE  
-esm/parser-postcss.mjs..........................................236 kB    DONE  
+esm/parser-postcss.mjs..........................................213 kB    DONE  
 parser-graphql.js.................................55.5 kB, esm 55.2 kB    DONE  
-parser-markdown.js..................................154 kB, esm 153 kB    DONE  
+parser-markdown.js..................................179 kB, esm 179 kB    DONE  
 parser-glimmer.js...................................169 kB, esm 169 kB    DONE  
 parser-html.js......................................162 kB, esm 161 kB    DONE  
 parser-yaml.js......................................144 kB, esm 144 kB    DONE  

The bundle size will increase a little, but I think it doesn't matter.

@fisker
Copy link
Member Author

fisker commented Feb 6, 2021

Size changed because we are using simple native-shim only shim a few modules, this plugin include more.

I think the size increase is acceptable.

@bobbyoz

This comment has been minimized.

@fisker fisker merged commit a1ba8fb into prettier:main Feb 8, 2021
@fisker fisker deleted the rollup-plugin-node-polyfills branch February 8, 2021 01:50
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants