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

How to require geojsonlayer.js in a webpack app #27

Closed
ahmadalibaloch opened this issue Aug 28, 2017 · 6 comments
Closed

How to require geojsonlayer.js in a webpack app #27

ahmadalibaloch opened this issue Aug 28, 2017 · 6 comments
Labels

Comments

@ahmadalibaloch
Copy link

ahmadalibaloch commented Aug 28, 2017

dojoRequire(['geojsonlayer.js'] is looking for geojsonlayer.js on a path on server. How to bundle this with webpack?
https://github.com/Esri/geojson-layer-js

@ahmadalibaloch ahmadalibaloch changed the title How to load geojsonlayer.js in a webpack app How to require geojsonlayer.js in a webpack app Aug 28, 2017
@tomwayson
Copy link
Member

I think you'd have to either use a relative path name ('./geojsonlayer.js') or set up a path/package in your dojoConfig so that the dojo loader can resolve that module. I suggest you get that working outside of webpack/esri-loader first.

@tomwayson
Copy link
Member

See also this similar issue: tomwayson/angular-esri-loader#24

@tomwayson
Copy link
Member

BTW - this should be easier since #40, see https://github.com/Esri/esri-loader#configuring-dojo

@ahmadalibaloch
Copy link
Author

I was not successful in this at that time, I left it. I will try again sometime.

@tomwayson
Copy link
Member

Sounds good.

I should have mentioned in my original response that b/c geojsonlayer.js is a Dojo AMD module, it will not be "bundled with webpack." What I'm proposing is that you configure Dojo to know how to be able to load it just like it loads the modules of the ArcGIS API.

@tomwayson
Copy link
Member

@ahmadalibaloch I'm assuming you've resolved your issue and closing this for now. Feel free to re-open if needed.

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

No branches or pull requests

2 participants