Skip to content
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

Webpack generates broken variable name #334

Closed
xi opened this issue May 10, 2017 · 0 comments · Fixed by #395
Closed

Webpack generates broken variable name #334

xi opened this issue May 10, 2017 · 0 comments · Fixed by #395
Assignees
Labels
Type: Bug incorrect or uexpected behaviour
Milestone

Comments

@xi
Copy link
Contributor

xi commented May 10, 2017

With the setup since #278, webpack generates the following code:

var leaflet.draw = …

This breaks some mapping functionality.

Possible fix: rename bundle to leafletDraw.

@xi xi added the Type: Bug incorrect or uexpected behaviour label May 10, 2017
@xi xi added this to the Release 1.0 milestone May 15, 2017
@xi xi self-assigned this May 16, 2017
xi pushed a commit that referenced this issue May 16, 2017
fixes #334

Before this, webpack would generate the following (invalid) code:

    var leaflet.draw = …

Now, the it will be more like this:

    this['leaflet.draw'] = …

Since this code is executed in the global scope (and this therefore
refers to `window`), it should result in the same thing, just with valid
syntax.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug incorrect or uexpected behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant