Leaflet / Leaflet/Leaflet.VectorGrid

Leaflet.VectorGrid bundle is not properly being reference

Open
#202 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
676
Forks
202
PR merge metrics
No merged PRs in 30d

Description

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.

Can anyone help me to resolve this referencing issue ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Leaflet.VectorGrid.bundled.js and reproduce the import with Webpack or Browserify described in the issue. Trace how Pbf is exposed when the bundle is referenced through import rather than a script tag. Done means the bundle works with the stated bundlers without requiring Pbf to exist globally.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.