-
Notifications
You must be signed in to change notification settings - Fork 59
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
feat: enable uglify mangle and compress #214
Conversation
Any idea what causes the error? Would be nice to be able to run js-ipfs through uglify with default settings |
Hey @fazo96, sorry for the late response, I must've missed the notification 😐 No idea to be honest. I got that error so I figured it could be solved by passing some options, and |
This commit is a backport of ipfs/aegir#214 Default flags from webpack broke pubsub by removing 'unused' experiments. This restores pubsub functionality and applies the fix for entire build pipeline.
This commit is a backport of ipfs/aegir#214 Default flags from webpack broke pubsub by removing 'unused' experiments. This restores pubsub functionality and applies the fix for entire build pipeline.
Change webpack minimizer flags to follow Aegir ### Problem fixed by this PR Default minimizer flags break pubsub with embedded node by removing 'unused' code of pubsub experiment. Details in #521. ### In This PR - Backport of ipfs/aegir#214: it restores pubsub functionality and applies the fix for entire build pipeline to avoid similar issues in future. - The way configuration blocks are merged is improved by use of [webpack-merge](https://www.npmjs.com/package/webpack-merge) - Bundles are bit smaller due to moving LICENSE comments to separate file (`extractComments: true`)
We can now enable mangling after changing the way we did some type checking, from comparing instances with
constructor.name
to using the class-is module that uses symbols, as proposed in ipfs/js-ipfs#1131 (comment).Check ipfs/js-ipfs#938 (comment) for some of the repos that were affected.
We can now also compress the code, but I've had to disable the
unused
flag (it drops unreferenced functions and variables -- check it) due to the following error:Fixes ipfs/js-ipfs#938.