-
-
Notifications
You must be signed in to change notification settings - Fork 106
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: Minification and more #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👌🏻
Cool, I updated the README! Btw, can I help maintain this project? |
Sure, just added you as a collaborator. |
Thanks :) I can merge this now if you'd like, but I don't think I'll be able to cut a release because of npm. Edit: I see you have semantic release setup. Are you okay with me releasing this whenever? |
@privatenumber yes, just write something starting with |
Great, thanks! I'm running some final tests in a few large codebases I'm in. Will release soon 👍 |
Two findings:
I'm okay with merging this for now and addressing these points later. WDYT? |
I figured why the loader was being problematic. It's because esbuild strips comments even when not minifying, which strips Webpack magic comments. -main: () => import(
-/* webpackChunkName: "chunk-name" */
-'../chunk-name'
-),
+main: () => import("../chunk-name") Edit: |
Going to move forward with this because it's an external issue and this isn't a regression. |
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issue
#2
Changes
Refactored the organization of src files by splitting up the plugin, loader, and minify plugin into separate files
Loader changes
this.sourceMap
instead of reading fromoptions
. This flag is toggled on by Webpack ifdevtool
uses source-map or ifSourceMapDevToolPlugin
is usedloader
is now passed in. I think it makes more sense for the user to set this, especially in cases where there's some Webpack magic happening and it's hard to detect the actual file type (eg..vue
files). With this change, a user can configureesbuild-loader
more predictably:Added
MinifyPlugin
devtool
orsourcemap
option. Plugins don't seem to have access to Webpack'ssourceMap
flagTests
README.md update TBD. I understand if this PR is not mergable considering these are dramatic changes with BCs. But if they're mergable, I can update the README to reflect that, otherwise, I'll re-package it.