Giter Site home page Giter Site logo

Comments (7)

tomwayson avatar tomwayson commented on June 15, 2024

A cheesy fix for this could be just to do: customElements.efineday = customElements.define before vendor.js is loaded.

from ember-esri-loader.

tomwayson avatar tomwayson commented on June 15, 2024

Or maybe specifying some uglify options to preserve customElements in the output.

from ember-esri-loader.

trescube avatar trescube commented on June 15, 2024

Dumb question: what does efineday do?

from ember-esri-loader.

tomwayson avatar tomwayson commented on June 15, 2024

https://github.com/Esri/ember-esri-loader/#how-it-works

from ember-esri-loader.

tomwayson avatar tomwayson commented on June 15, 2024

I tried disabling ember-cli-uglify but customElements was still getting mangled. I then remembered that ember-auto-import applies babel transforms, so I tried:

      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 skipBabel didn't get applied.

from ember-esri-loader.

tomwayson avatar tomwayson commented on June 15, 2024

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>

😞

from ember-esri-loader.

tomwayson avatar tomwayson commented on June 15, 2024

FYI - that does not work in IE, we get a 'customElements' is undefined error:

image

I could check for customElements before executing that line, but I think we'll end up running into the original error later when the someone uses a stencil component.

I think that would need to run after the custom elements polyfill is added.

from ember-esri-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.