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

Ember: show how to use it w/ the ArcGIS API for JavaScript #3

Closed
tomwayson opened this issue May 27, 2020 · 1 comment
Closed

Ember: show how to use it w/ the ArcGIS API for JavaScript #3

tomwayson opened this issue May 27, 2020 · 1 comment

Comments

@tomwayson
Copy link
Member

I suspect most apps that use this will want to also use the ArcGIS API for JavaScript. In Ember, you need either one of these addons:

ember-cli-amd
ember-esri-loader

The problem is that both of those will find and replace any calls to require() define() in the code at build time, and if you are using either ember-cli-stencil or the method shown in this example to load the JS, you will get errors when stencil tries to call customElements.define(). ember-esri-loader@4.00+ is designed to avoid those errors, but they will still show up in production builds. There's a workaround for that. A similar hack may work for emebr-cli-amd.

I think it would be good to at the very least document ^^^ in the README.

We could take it a step further and add ember-esri-loader to this repo and try and work through the trouble I was having trying to keep customElements from getting mangled in production builds and see if we can come up w/ a less hackish work around.

@ffaubry
Copy link
Member

ffaubry commented Jul 27, 2020

The recent PR #6 has addressed the issue of using calcite components with ember-cli-amd.
See https://github.com/ArcGIS/calcite-components-examples/tree/master/ember#using-with-jsapi

The instructions have not been updated for how to use ember-esri-loader.

@benelan benelan closed this as completed Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants