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/result?p=react-focus-lock@1.17.2 |
|
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 💯 |
Reduce size
setImmediateforced@babel/plugin-transform-runtimeto add unnecessarysetImmediateandprocesspolyfills.process.env.NODE_ENV !== "production"propTypeswrapping by Babel (machines must suffer)