-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Unminified.js #6143
base: main
Are you sure you want to change the base?
Unminified.js #6143
Conversation
Fixes decaporg#6104 (if it works)
@@ -1,5 +1,6 @@ | |||
const path = require('path'); | |||
const webpack = require('webpack'); | |||
const TerserPlugin = require("terser-webpack-plugin"); |
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.
Note to me: this should be added as an explicit dependency, it's only available because of yarn/lerna hoisting.
@@ -79,12 +83,13 @@ function targetOutputs() { | |||
return { | |||
umd: { | |||
path: umdPath, | |||
filename: `${pkg.name}.js`, | |||
filename: pathData => pathData.chunk.name === 'minified' ? `${pkg.name}.js` : `${pkg.name}.[name].js`, |
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.
@erezrokah know if I need to do something similar to this for all the other target ouputs?
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.
Let me check how we're using the other targets and follow up
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@martinjagodic I'd still like a solution to #6104 but I imagine this is out of date now - are you planning on sticking with webpack + a custom build config? I would have thought in 2023 and with the significant netlify->decap overhaul it'd be better to switch to something like microbundle which can take care of pretty much everything without worrying much about configuration. Or, use turbopack in anticipation of it getting out of beta and becoming the de-facto webpack successor (usually a good idea to bet on Vercel!). If you disagree, feel free to reopen this and I may be able to find some time to fix up the build. |
Yes, we need unminified JS. I believe that build tools are not on the radar yet. @demshy do you have any comments on this? I guess we will have to revisit this soon. |
✅ Deploy Preview for decap-www canceled.
|
Ok, I've reopened and updated. If it goes green I can't see any great harm in it going in like this, the build tools could always be updated afterwards. Over a year ago I said it wasn't ready, I don't remember what was missing exactly but maybe not much. |
Fixes #6104
Not ready yet but CC @erezrokah
Summary
Produces unminified js.
Test plan
yarn build
innetlify-cms-core
, it works and produces the right filesyarn build
in the repo rootChecklist
Please add a
x
inside each checkbox:yarn format
.yarn test
.A picture of a cute animal (not mandatory but encouraged)
best I can do is 🐈