Skip to content

Commit

Permalink
fix(webpack-utils): compact user JS only in production builds (#19240)
Browse files Browse the repository at this point in the history
* fix(webpack-utils): JS is only compacted in production

- This line was preventing debugging while using `gatsby develop`
- Fixes [issue #19128](#19128)

* test(webpack-utils): updates snapshot for default cases
  • Loading branch information
Toolo authored and pieh committed Nov 4, 2019
1 parent 0b57a3c commit 982fd22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Object {
Object {
"loader": "<PROJECT_ROOT>/packages/gatsby/src/utils/babel-loader.js",
"options": Object {
"compact": true,
"compact": false,
"configFile": true,
"stage": "develop",
},
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/utils/webpack-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ module.exports = async ({
loaders.js({
...options,
configFile: true,
compact: true,
compact: PRODUCTION,
}),
],
}
Expand Down

0 comments on commit 982fd22

Please sign in to comment.