Skip to content

Sourcemaps in production build #1563

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

Closed
fantua opened this issue Feb 15, 2017 · 1 comment
Closed

Sourcemaps in production build #1563

fantua opened this issue Feb 15, 2017 · 1 comment

Comments

@fantua
Copy link

fantua commented Feb 15, 2017

Hi,

I have a question about sourcemaps. I noticed that after production build sourcemaps is also generated. Is it good practice in production mode, and also safely?

Maybe there is some ENV param to disable this?

@gaearon
Copy link
Contributor

gaearon commented Feb 15, 2017

JavaScript is inherently “open” to the client because the client has to execute it. It is unwise to rely on minification for any security considerations. If you’re worried about some code being seen, you should not send it in the JS bundle in the first place.

However, you can safely delete the *.map files from the build output if you wish so. The browser will likely warn you, but this doesn’t affect users in any way.

Just keep in mind it’s not a good security measure.

@gaearon gaearon closed this as completed Feb 15, 2017
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants