-
Notifications
You must be signed in to change notification settings - Fork 929
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Error when compiling with babel-webpack #301
Comments
People have pointed out that it could it be an issue with |
I tend to agree that it's an issue with ({"NODE_ENV":"production"}).DEBUG = namespaces; |
Found it, it's an issue with webpack's I had my setup in the following way:
Which at webpack's build time overrides the whole process.env object. Still not fixed though 😢 , but maybe someone can find this info useful 😄 |
Anyone want to take this issue on with a PR? |
This workaround worked for us using the DefinePlugin. new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
}), |
Closing, since this is an issue with your webpack configuration, not with debug itself. |
i ran into a similar issue with webpack's DefinePlugin and the acorn parser falling over on special characters searching for webpack defineplugin unexpected token leads here; i have a write up over on the webpack issues that goes into more detail. |
HI @everyone
I'm getting some weird output after transpiled the library in webpack with babel.
Specifically, an
Unexpected token: punc (:)
error on.[/~/debug/node.js:122,0]
Point is, it's transpiling lines like:
into:
Why would it transpile
process.env
into that object?The text was updated successfully, but these errors were encountered: