Esri / ember-cli-amd

Ember CLI Addon for using AMD libraries
Apache License 2.0
21 stars 15 forks source link

replace-require-and-define mangles MemberExpressions #54

Closed crowjonah closed 4 years ago

crowjonah commented 4 years ago

In several apps, we're using ember-cli-amd to consume the Esri arcgis-js-api. We've recently introduced Stencil components via calcite-components, where there's a known conflict with this repo.

In https://github.com/Esri/ember-esri-loader/, they've worked around this issue by replacing the espree/esrima-walk approach with a regex that explicitly skips customElements.define.

I forked this repo and tried to improve the parser approach, but esprima-walk's walkAddParent method is broken when also using range, and an open PR there doesn't appear to resolve the issue. Further, that repo hasn't been updated in 4 years.

Long story short, it'd be useful if ember-cli-amd could avoid rewriting calls to customElements.define at least, but maybe also *.[require|define].

ffaubry commented 4 years ago

This has been fixed in version 3.1.0. Closing.