Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

make it work with browserify #253

Closed
max-mapper opened this issue Mar 24, 2013 · 5 comments
Closed

make it work with browserify #253

max-mapper opened this issue Mar 24, 2013 · 5 comments

Comments

@max-mapper
Copy link

hiya it'd be cool if this worked with browserify, e.g.

var mapbox = require('mapbox.js')

I tried to figure out your makefile and stuff but it was way too complicated for me

@tmcw
Copy link
Contributor

tmcw commented Apr 2, 2013

There's now a proper entry for "main", but somehow the pretty convoluted UMD-in-module-in-whatever setup is trying to init L.Hash before Leaflet itself, and failing there.

@jfirebaugh
Copy link
Contributor

I think the problem is that the L initializer gets run in a scope that has exports defined, so assigns to it rather than window.

@joeybaker
Copy link
Contributor

Hmm… I'm still getting a build error:
Error: module "Leaflet/dist/leaflet-src" not found from "node_modules/mapbox.js/index.js"

@jfirebaugh
Copy link
Contributor

Yep, there was a problem with the leaflet package. Please try alpha2.

@joeybaker
Copy link
Contributor

Got it. thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants