-
Notifications
You must be signed in to change notification settings - Fork 193
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
plugin not working when used in React components #37
Comments
I'm having the same problem, but I don't think the it's related to React specifically. It seems |
This can be fixed by adding an entry in webpack.config in the webpack plugins
…Sent from my iPad
On Dec 8, 2016, at 9:50 AM, Jan Wolski <notifications@github.com<mailto:notifications@github.com>> wrote:
I'm having the same problem, but I don't think the it's related to React specifically. It seems Leaflet.VectorGrid.bundled.js does not play well with JS bundlers (Webpack/Browserify). VectorGrid expects Pbf to be defined in the global scope, but if the bundle is referenced with 'import' and bundled with Webpack, the global Pbf object will not be available.
-
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#37 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOP59c5Qc3OLadQw0CbQ4gmbiDLbqXmFks5rGBkegaJpZM4LAdyI>.
________________________________
TERRALIGN CONFIDENTIAL: This email and its attachments contain confidential and proprietary information of The TerrAlign Group, Inc. Disclosure is strictly prohibited.
|
I've a similar problem with my local package where I add inside onUse function: I'm not using webpack: I'm playing with meteorkitchen.com generator so I need to find alternative solutions |
I found solution |
When using the bundled version like so:
import {} from 'leaflet.vectorgrid/dist/Leaflet.VectorGrid.bundled.js'
and one tries to use Protobuf, the console report 'Pbf undefined'
When 'import' all the files require by Leaflet.VectorGrid, this error goes away, but then it complains that L.Renderes.Tile is undefined
The text was updated successfully, but these errors were encountered: