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

Disable source maps for node_modules #5096

Merged
merged 1 commit into from
Sep 26, 2018

Conversation

Timer
Copy link
Contributor

@Timer Timer commented Sep 26, 2018

Disabling source maps for node_modules is a good default because an error might've happened in the context of being compiled, thus debugging against the source actually being evaluated (barring minification) would be a lot easier.

This should also be faster.

@Timer
Copy link
Contributor Author

Timer commented Sep 26, 2018

Before:

✨  Done in 77.83s.
joes-mbp:website joe$ du -h build/
132K    build//static/css
 16M    build//static/js
228K    build//static/media
 16M    build//static
 16M    build/
joes-mbp:website joe$

After:

✨  Done in 67.07s.
joes-mbp:website joe$ du -h build/
132K    build//static/css
 16M    build//static/js
228K    build//static/media
 16M    build//static
 16M    build/
joes-mbp:website joe$

@Timer Timer merged commit 969fb37 into facebook:next Sep 26, 2018
@Timer Timer deleted the disable-node-modules-source-maps branch September 26, 2018 01:24
@marcofugaro
Copy link
Contributor

How? The default value of sourceMaps is false.

https://babeljs.io/docs/en/next/options#sourcemaps

Babel-loader is saying instead that he ignores that option:

https://github.com/babel/babel-loader#options

@gaearon
Copy link
Contributor

gaearon commented Sep 26, 2018

Despite what docs say, if you look at the source you’ll see it uses this option. Also note it’s sourceMaps, not sourceMap (which is ignored per docs).

@marcofugaro
Copy link
Contributor

marcofugaro commented Sep 26, 2018

Huh weird, thanks man!

zmitry pushed a commit to zmitry/create-react-app that referenced this pull request Sep 30, 2018
@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants