Banno / polymer-webpack-loader

WebPack Loader for Polymer Web Components
MIT License
192 stars 48 forks source link

Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry #71

Closed hitesh97 closed 6 years ago

hitesh97 commented 6 years ago

Hi Guys, I am hoping to use this loader with my project and very impressed with the this loaded so far. Great work! I am however, getting error when I am trying to include another element in the project in a different directory imported in main element( root element )..

Meaning ; when I have

< main-element > < link rel="import" href="./subDir/another-element.html" > < another-element >< /another-element > < /main-element >

I get following error. Can you guys please let me know, if this is possible? OR how do i configure the loader for it to work?

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry at CustomElementRegistry.value (http://localhost:9000/bower_components/webcomponentsjs/custom-elements-es5-adapter.js:4:902) at Object. (http://localhost:9000/bundle.js:10209:23) at webpack_require (http://localhost:9000/bundle.js:20:30) at Object. (http://localhost:9000/bundle.js:10145:1) at webpack_require (http://localhost:9000/bundle.js:20:30) at Object. (http://localhost:9000/bundle.js:1447:18) at __webpack_require__ (http://localhost:9000/bundle.js:20:30) at userPolymer (http://localhost:9000/bundle.js:63:18) at http://localhost:9000/bundle.js:66:10

bryandcoulter commented 6 years ago

Hi @hitesh97, can you work this up in a sample repo?

hitesh97 commented 6 years ago

Hi @bryandcoulter , I found the issue with this, I had copy of same custom element defined with duplicate name in its class as 'string' hence the error.. Fixed the issue.. thanks for the support though.

Also, we are evaluating polymer 3 preview with typescript and webpack..