-
Notifications
You must be signed in to change notification settings - Fork 4.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
Scripts: Allow WP_DEVTOOL to set devtool in prod builds #46812
Conversation
Size Change: 0 B Total Size: 1.31 MB ℹ️ View Unchanged
|
Any update here @gziolo @ntwb @nerrad @ajitbohra @ryanwelcher ? |
Do I understand it correctly that the only difference with #45251 would be that it keeps the default behavior as is, but it allows overriding for both production and development at the same time? It sounds like a nice addition 💯 |
Yes. With this approach in here, you don't change the current default behavior. So we have following scenarios: 1. default:
2. I need SourceMaps:
See all available variants here: https://webpack.js.org/configuration/devtool/ |
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.
This looks good. It would be nice to include a note in the CHANGELOG, so folks are aware of new behavior for production builds when the flag is explicitly enabled.
It's a backward-compatible version in contrast to the #45251 alternative.
d24ac54
to
b6b9a28
Compare
What?
Alternative to #45251. Allows
WP_DEVTOOL
to set the source map mode for production builds as well as dev builds.Why?
Resolves #44278. Currently, wp-scripts can't create sourcemaps for production builds.
How?
Set devtool whether or not we're in dev mode.
Testing Instructions
Mostly, verify the logic. If you have an existing project, verify that you can create sourcemaps with
WP_DEVTOOL
.Testing Instructions for Keyboard
Screenshots or screencast