Skip to content
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

fix(webpack-utils): compact user JS only in production builds #19240

Merged
merged 2 commits into from
Nov 4, 2019
Merged

fix(webpack-utils): compact user JS only in production builds #19240

merged 2 commits into from
Nov 4, 2019

Conversation

Toolo
Copy link
Contributor

@Toolo Toolo commented Nov 3, 2019

Description

This line was preventing debugging while using gatsby develop.

By relying on the existing PRODUCTION variable, we ignore compacting in a dev environment.

Related Issues

Fixes issue #19128

- This line was preventing debugging while using `gatsby develop`
- Fixes [issue #19128](#19128)
@pieh pieh changed the title fix(webpack-utils): JS is only compacted in production fix(webpack-utils): compact user JS only in production builds Nov 4, 2019
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally, and indeed that allows more fine grained breakpoint debugging.

Thanks @Toolo!

@pieh pieh merged commit 982fd22 into gatsbyjs:master Nov 4, 2019
@Toolo Toolo deleted the fix/gatsby_develop_compact_prevents_debugging branch November 4, 2019 19:40
rickiesmooth pushed a commit to rickiesmooth/gatsby that referenced this pull request Nov 8, 2019
…js#19240)

* fix(webpack-utils): JS is only compacted in production

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

* test(webpack-utils): updates snapshot for default cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[gatsby] gatsby develop produces minified source code
2 participants