-
Notifications
You must be signed in to change notification settings - Fork 6
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
efineday is not a function error when using w/ ember-cli-stencil in production builds #95
Comments
A cheesy fix for this could be just to do: |
Or maybe specifying some uglify options to preserve |
Dumb question: what does |
I tried disabling ember-cli-uglify but skipBabel: [{
// needed for ember-esri-loader
package: '@esri/calcite-components',
semverRange: '*'
}], But that had no effect either. Then I thought, "oh, it's skipping babel but then getting uglified." So I tried both together. No dice. At this point I'm not sure what's transforming that file (for reference, this is the file in question, line 2070). It feels like |
FWIW - adding the following to the index.html files (app and test) before the vendor.js script tag seems to work. <script>
// see: https://github.com/Esri/ember-esri-loader/issues/95#issuecomment-634392591
customElements.efineday = customElements.define;
</script> 😞 |
FYI - that does not work in IE, we get a I could check for I think that would need to run after the custom elements polyfill is added. |
Getting
Uncaught (in promise) TypeError: a.efineday is not a function
errors when using this w/ember-cli-stencil (specifically w/ calcite-components), but only in production builds. Example:
https://coronavirus-response-alaska-dhss.hub.arcgis.com/datasets/covid-cases-out-of-state/data?uiVersion=5f51dc80921ca7850742e54353752c7a591cbdd6
The issue appears to be that we've added an exception to the regex for
customElements.define()
, but in a production build this addon is operating on the uglified code, so this statement:is now
a.define(c, he(u, r, 1)))
Maybe we can instruct the ember build to run this before uglify? That might cause other errors.(see #95 (comment))The text was updated successfully, but these errors were encountered: