-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Anonymous evals in Chrome when //# sourceMappingURL...
is used.
#1360
Comments
Not sure what the problem is. Source maps should just work in the browser, with no additional help. |
@adjavaherian it's actually a specific issue with V8 not supporting source maps for stack traces. The situation is described in I've recently managed to get this working how I like, with a combination of
Hope this information is useful for others. Will close this issue over the weekend 😅 |
@adjavaherian Did you have any CORS issues using node-source-map-support? For me, it complains about the Crazy that in 2015 this is still a painful problem. |
What's adding the |
@adjavaherian That's webpack putting that in: You can see it talking about that in the docs: http://webpack.github.io/docs/configuration.html But, when I just tried to reproduce the CORS problem, I couldn't, and it worked! Not sure what was going on, but assuming it doesn't pop up again, thanks! First time I've seen sourcemaps for stacktraces in Chrome! It only seems to work with Have that weird Still messed up that we have to jump through these hoops. But thanks again! |
@jdeal Re the SJAX request, there's a bunch of useful information linked to in evanw/node-source-map-support#92. And yea I agree, I'm hoping V8 helps us out sometime soon too 😄 |
Closing this as promised earlier. We have a working solution based on the information in this thread 👍 |
Hey all. Feel a bit cheeky as this appears to be more of a browser issue than a webpack issue, but thought I'd mention it here to see if others had run into the same thing while using webpack, and had any workarounds I hadn't thought of 😄
We're bundling a big app that uses babel-loader for ES2015 -> ES5. In order to debug our source files and still get reasonably fast rebuilds, we're using the
devtool: '#cheap-module-eval-source-map'
option, which adds a//# sourceMappingURL...
comment to the module eval blocks.Unfortunately in Chrome, the eval blocks are anonymous for any
Error.prototype.stack
traces. We use Jasmine for testing, which outputs a stack trace when a test fails. Since this isanonymous
, it makes debugging more difficult.I tried hacking the
EvalSourceMapDevToolModuleTemplatePlugin
in order to name the eval blocks by adding a//# sourceURL...
comment after the//# sourceMappingURL...
comment. AFAIK this is what Coffeescript does? This had the desired effect in Firefox, but Firefox's slow load time was a big problem for us. In Chrome, the eval blocks were now named, but the DevTools console was showing the compiled source, so it seemed like it was just ignoring the//# sourceMappingURL...
comment.Any ideas or workarounds?
Some more relevant links:
The text was updated successfully, but these errors were encountered: