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

Add a --debug flag for production builds which disables uglify #4732

Closed
KyleAMathews opened this issue Mar 27, 2018 · 5 comments
Closed

Add a --debug flag for production builds which disables uglify #4732

KyleAMathews opened this issue Mar 27, 2018 · 5 comments
Assignees

Comments

@KyleAMathews
Copy link
Contributor

It's really hard to debug some problems (e.g. mismatches between SSR & client renders #3067) without this.

@m-allanson
Copy link
Contributor

Could this initially be done as a plugin if someone wanted to work on it?

@KyleAMathews
Copy link
Contributor Author

Yeah — but this seems like something that should be built in — not something people have to install and add/remove to their gatsby-config.

Let's perhaps not name it --debug though as that'll confuse people as the scope of the feature is small and debug seems expansive. Maybe be really specific e.g. --no-uglify.

It'd be a really easy PR to add.

@tsriram
Copy link
Contributor

tsriram commented Mar 28, 2018

I'll give this a go.

@tsriram tsriram self-assigned this Mar 29, 2018
@ghost ghost added the review label Mar 29, 2018
@ghost ghost removed the review label Apr 2, 2018
@dandv
Copy link
Contributor

dandv commented May 7, 2020

If --no-uglify was necessary, am I to understand that gatsby build does uglify by default (or should uglify)?

I see code in clear, including comments, as a result of gatsby build, and you can see that in some big brand public sites:

image

image

I thought, maybe those sites are engineering-oriented and leave their code open for inspection, but then I looked at https://www.shopflamingo.com. Same story. https://impossiblefoods.com/ Same.

Does Gatsby actually no longer uglify when building?

@dandv dandv reopened this May 7, 2020
@LekoArts
Copy link
Contributor

LekoArts commented May 7, 2020

Please don't open up year old issues, it's not really helping your cause. Thanks!

About your comment: You can see those things due to Webpack's "Sourcemaps" that get shipped with the build (you can disable this behavior manually if you want).

@LekoArts LekoArts closed this as completed May 7, 2020
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

No branches or pull requests

5 participants