hotforfeature / angular-polymer-starter-kit

A starting point for Angular 4 and Polymer 2 apps
5 stars 4 forks source link

customElements is undefined #4

Closed Draeken closed 6 years ago

Draeken commented 6 years ago

When I launch npm run start:es5 on Firefox 59. This happens before webcomponentReady resolved, due to polymer element import in app.component.ts

hotforfeature commented 6 years ago

Thanks for the report!

I've updated main.ts to dynamically import AppModule instead of importing it synchronously before the WebcomponentsReady event. I've also added comments as to why this is needed and an alternative way of importing the main component that uses Polymer.

Let me know if you have any questions!

Draeken commented 6 years ago

Awesome! Thanks!

varletconst commented 6 years ago

Hi, Error is still present when using --prod flag (Firefox)

hotforfeature commented 6 years ago

@varletconst I've updated the repo, try pulling it again

varletconst commented 6 years ago

It works well in prod mode but throw in dev mode. Using require works in both mode