-
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
browserify bundle is broken #4453
Comments
Oops, although our docs were out of date, that doesn't seem to be the issue here. |
After I isolated the issue in the small repo, I made it work when requiring from source: |
Thanks for posting the workaround, @ellvtr @mollymerp I think you're right that this is a result of #4423 -- the browserify/browser-pack#45 suggests that standalone browserify bundles might not be usable as modules that can be |
Ah, I think I misread that browser-pack issue -- it's about the |
I see that you changed the docs to |
mapbox-gl-js version: "^0.34.0"
Steps to Trigger Behavior
Complete reproduction of bug in this super simple dedicated repo:
https://github.com/awesomemaptools/mbtst
require('mapbox-gl/dist/mapbox-gl')
as documented here: https://www.mapbox.com/mapbox-gl-js/api/node node_modules/browserify/bin/cmd.js --entry src/main.js --outfile dist/build.js
Expected Behavior
Expected to create bundle in dist/build.js and when run in browser, map will render as it does using regular CDN.
Actual Behavior
Terminal error - "Cannot find module".
The text was updated successfully, but these errors were encountered: