-
Notifications
You must be signed in to change notification settings - Fork 67
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
Reduce size #47
Reduce size #47
Conversation
@theKashey |
Actually that stuff with |
@ai - size did not changed for me. Still 5.89. Even more - I still could see |
It was added by
Di you run |
Sure. I've even published it already :) https://bundlephobia.com/[email protected] |
Maybe we have some difference in how BundlePhobia count the result? Try to check bundle size of a real project after the update. |
Hm. Seems like I found a reason. npm package contains |
Yeap, there are some problems. Seems like my Babel hack doesn’t work :( |
Yeap, Do you have an idea how we can ask Webpack to not insert its polyfill for |
I added issue to webpack webpack/webpack#8280 |
I found solution #48 🎉 |
then I will access |
JFYI, webpack inserts polyfills for node.js globals: https://webpack.js.org/configuration/node/
|
@krasnoperov we can’t ask every user to change webpack config :(. |
Sure. I believe that polyfill should be disabled by default. |
Look like we are done for today, and magically stripped a few kb. Now I am thinking to run babel on my node-modules, to strip away all not-yet-removed propTypes. It would also great to create babel or webpack plugin to replace inlined helpers by babel-runtime among each and every file inside node_modules folder. Should be easy, and very effective. Next iteration, I recon, would be about react hooks, and they will reduce package size a lot. @ai 💯 |
setImmediate
forced@babel/plugin-transform-runtime
to add unnecessarysetImmediate
andprocess
polyfills.process.env.NODE_ENV !== "production"
propTypes
wrapping by Babel (machines must suffer)