-
-
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
devtool: 'eval' causes ReferenceError #417
Comments
Weirder, this seems to only affect Chrome and doesn't happen when |
This may actually be a Chrome bug. This fiddle alerts OK in all browsers except Chrome. |
It's not a webpack problem, it's caused by the scoped use of |
I'm curious: why does this work in other browsers? Do they implement the spec incorrectly? |
Yes ... you're right, it's strange. I don't know. |
I've opened a PR with the Flux folks that references this: facebookarchive/flux#45 |
This behavior may match the spec for eval, but it's still unintuitive (and IMO, a bug) that the recommended devtool setting for source maps causes code to behave differently than it does without the source map. |
@gaearon were you able to get this working? Even w/ flux 2.0.1 I still see the error when using |
@gaearon I got it fixed by using |
I tried switching to
devtool: 'eval'
but I keep gettingReferenceError
s in one of the files.The code is perfectly legit though and works fine with
devtool: 'source-map'
.Offending code is from Facebook Flux Dispatcher:
This variable is declared on top of that file:
Dispatcher.js
The text was updated successfully, but these errors were encountered: