-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
"sourceMaps" option in babelrc has no effect #2484
Comments
I've thought about this and it doesn't make any sense. The behaviour of the CLI flags and API options are fundamentally different. Making an API option produce source maps on disk is very different to just populating a property. I'm going to close this as a wontfix. |
Maybe remove the option then? If I use |
Except it's a perfectly valid API option. On Sun, Oct 11, 2015 at 3:08 AM, Andy Hanson notifications@github.com
|
@sebmck, I just wasted half an hour reproducing this. I might not be the only one. Reading this thread, I'm now worried there might be //other// options Maybe, you can wallpaper over this one with a documentation fix. I doubt it. The presence of Also, consider the case of I can write my own command line for
Hello! I am also surprised by this implementation decision. I just had to double-check to make sure that the documentation does not explicitly state I would be a very good idea to clarify in the Babel Options documentation which
Then why have an rc file when you're not going to follow *nix philosophy?
I'm quite confused by this as well.. The babel cli will use the .babelrc to configure itself, but ignores specific "API Only" configuration parameters? Wouldn't it then make sense to have two different configuration files? One for the API and one for the CLI if they both aren't following the same schema? I just ran into this same problem and was surprised to see the responses. Is there documentation on which API options MUST be specified via command line (if they are going to be used with babel cli)? The crux of the issue is that the Babel CLI and the Babel API 'use' the same .babelrc file, but accept different schemas. And the better question is why would the Babel CLI allow certain parameters to be specific in the .babelrc but not source maps? Is it because source maps is a different API in itself when used in a build system like gulp? |
It works if you set it to "inline" |
…make babel generate sourcemaps on build Why not in .babelrc? See here: babel/babel#2484
Yeah, that's confusing, it works for "inline" but not for |
Create an empty directory and do this:
lib/index.js
will be created but notlib/index.js.map
.Adding
--source-maps
to the command fixes the problem, but I want to do that through babelrc.The text was updated successfully, but these errors were encountered: