-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Using devtools with react-stylegudist #456 #569
Conversation
The `devtool` setting in your webpack config will now get passed through for non-production environments, e.g., running the hot-reloading server. It will still get ignored for production builds. Docs updated, and added a test.
Codecov Report
@@ Coverage Diff @@
## master #569 +/- ##
==========================================
+ Coverage 96.04% 96.04% +<.01%
==========================================
Files 99 99
Lines 1314 1316 +2
Branches 271 271
==========================================
+ Hits 1262 1264 +2
Misses 51 51
Partials 1 1
Continue to review full report at Codecov.
|
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.
Thanks for the pull request! I have a few suggestions ;-)
@@ -38,3 +38,13 @@ it('should ignore certain Webpack plugins', () => { | |||
expect(result.plugins[0].constructor.name).toBe('UglifyJsPlugin'); | |||
expect(result.plugins[1].constructor.name).toBe('MyPlugin'); | |||
}); | |||
|
|||
[ |
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.
It would be almost shorter and much more readable if you write two separate tests without the loop ;-)
scripts/utils/mergeWebpackConfig.js
Outdated
// For production builds, we'll ignore devtool settings to avoid | ||
// source mapping bloat. | ||
if (env === 'production') { | ||
safeUserConfig = omit(safeUserConfig, ['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.
I’d define a new const for that, like IGNORE_SECTIONS_PROD for consistency. Or even:
const IGNORE_SECTIONS_ENV = {
development: [],
production: ['devtool']
}
In this case you could avoid a condition.
Thanks, merged! |
The
devtool
setting in your webpack config will now get passed through for non-production environments, e.g., running the hot-reloading server.It will still get ignored for production builds.
Docs updated, and added a test.