-
Notifications
You must be signed in to change notification settings - Fork 361
Add field to package.json to output an unminified build #1097
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
base: master
Are you sure you want to change the base?
Conversation
|
76d0086 to
54e48b4
Compare
0a134ab to
74fdad6
Compare
54e48b4 to
1e51a12
Compare
Not sure on your specific intent here, but a while back I toyed with doing just this with Preact and found it absurdly easy to break apps by pulling in two copies at once. Ensuring the entire module graph resolves just to the debug build is just as tricky as trying to avoid the dual package hazard and users aren't going to understand the intricacies. I'm not against adding this, it may be useful for Microbundle users, but I don't think we can ship it with Preact stuff in particular. Way too easy for folks to break their apps and get the (incredibly opaque) |
1e51a12 to
8b91262
Compare
|
Size Change: 0 B Total Size: 65.9 kB ℹ️ View Unchanged
|
8b91262 to
bf19e48
Compare
I'm often wanting to step through the source of Preact or Signals, but doing this is difficult since we ship minified code. In this PR I add an option to microbundle to output a "debug" build. This debug build is just an unminified ESM bundle of the library.
Consumers of microbundle libraries can then setup an alias in their bundle to use this build output when they want to step through sources of libraries of microbundle libraries.
NOTE: This format DOES NOT support React-style development vs production builds. This format only produces an unminifed build of the same source that is minified in other builds. However it should only be used for development. We have tuned the minification options to produce better than average minification and so those minified builds should be used in production bundles.