-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Production build with Webpack 4 error #6648
Comments
@grillorafael can you clarify how you're including the |
I attached a sample project. When running in dev mode it works just fine and when running in prod mode it gives that error. |
I'm experiencing this too. On upgrading to
Mapbox is imported with |
Ah, ok, so the problem is the Mapbox should probably escape periods (and any other special characters) before serializing, and then unescape them when deserializing. EDIT: looking at the EDIT2: Ok, so it looks like the bug was likely introduced in 373f5c4 |
Hi @mike-marcacci I believe the problem you have is unrelated to mine |
@grillorafael woops! You're right, sorry to derail the thread. I filed a new issue #6660 |
Hi @anandthakker I don't know if my build have something wrong in it so if you could give it a quick check. |
Looks like this is a bug caused by minification -- if you turn that off, the issue does not occur. In particular, it's most likely related to the way we're constructing the Blob URL for the web worker script using
This assumption is not true of mapbox-gl-js. |
Actual minimal demonstration: https://gist.github.com/anandthakker/6db8a871ccbbaba8afd7deeb483731ef |
Thanks Anand! I’ll give it a try tomorrow and close the issue right after.
|
Hi @anandthakker seems to be working just fine. Thanks! |
I think the issue should be addressed properly. I am facing the same issue and the bundle file size w/wo minification is immense. |
@shinstudio The package on npm is minified -- package.json |
@jfirebaugh Duh, I was using 0.45.0-beta.1... after switching to 0.45.0 I was able to minify it without the issue. sorry for the noise! |
mapbox-gl-js version: 0.45.0
browser: Firefox Quantum
Steps to Trigger Behavior
Generates
ReferenceError: t is not defined
when running the production build with webpack 4.Works just fine with
0.44.2
The text was updated successfully, but these errors were encountered: