Hi,
I have to create a script that is eval’d in an environment where window.L is already present.
I need the following npm packages
- leaflet
- leaflet.Editable
- leaflet.path.drag
The following code loads Leaflet twice
import L from 'leaflet';
import 'leaflet.Editable';
import 'leaflet.path.drag';
which causes all kinds if conflicts
Now I want to try to convince leaflet.Editable and leaflet.path.drag to use the global window.L
So far no success.
Also, I have not been successful in telling build.js not to use my npm leaflet package. If I don’t install it the build fails.
Here’s my latest attempt.
var stealTools = require('steal-tools');
stealTools.build({
config: __dirname + '/package.json!npm'
},
{
bundleSteal: true,
minify: false,
meta: {
"leaflet": {
bundle: false
}
}
}
);
Also in package.json I’ve tried all kinds of variations. Latest:
"envs": {
"window-production": {
"map": {
"leaflet": "@empty"
}
}
}