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

how to use it with webpack #222

Open
diminglei opened this issue Feb 15, 2019 · 3 comments
Open

how to use it with webpack #222

diminglei opened this issue Feb 15, 2019 · 3 comments

Comments

@diminglei
Copy link

Hi,
Could you advise how to use calcite-maps with webpack and arcgis-webpack-plugin. I tried:

  1. download code from https://github.com/odoe/jsapi-bootstrap

  2. modify jsapi-bootstrap/src/config.ts, add calcite-maps modules:
    {
    name: "bootstrap",
    location: "https://esri.github.io/calcite-maps/dist/vendor/dojo-bootstrap"
    },
    {
    name: "calcite-maps",
    location: "https://esri.github.io/calcite-maps/dist/js/dojo"
    },

  3. but it's not working, arcgis said the ersi config is only for the workers in the ArcGIS API for JavaScript, they do not map libraries into your application.

Thanks,
Benjamin

@MichalisM
Copy link

Having the same issue. Is there any solution or workaround?

Thank you in advance.
Michali

@crackernutter
Copy link

Nothing yet - having similar issues.....

@crackernutter
Copy link

@MichalisM @diminglei @alaframboise
I'm been struggling all day to get this to work with webpack and the arcgis-webpack-plugin and have had to make a bunch of edits but have finally gotten it to work....
Of note is the error referenced at OpenNTF/dojo-webpack-plugin#167, which I was receiving. Unfortunately the solution was to change dojo/domReady! to dojo/ready in all modules I was importing. In this case, Dropdown.js in \node_modules\calcite-maps\lib\js\dojo-bootstrap and calcite-maps-arcgis-support-v0.10.js \node_modules\calcite-maps\dist\js\dojo. I don't know if there is a way to change a node_modules dependency programatically (I assume there is through webpack). However, my question for @alaframboise is if there would be any issue to just changing it in the repo itself...

Anyway, there were some other webpack related changes I needed to make, but I think that had more to do with my specific environment (vue-cli). Hope that helps...

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

No branches or pull requests

3 participants