manolo / gwt-polymer-elements

Polymer Web Components for GWT. A collection of Material Design widgets for desktop and mobile.
Apache License 2.0
155 stars 49 forks source link

GWT Super Dev and static import of iconsets #76

Closed brOOper closed 7 years ago

brOOper commented 8 years ago

In my index.html I make a static import of an iconset of font awesome icons

<link rel="import" href="iconsets/fa-all.html"/>

That works fine as long as I don't recompile the application with GWT's superdev. Then a get the following error

Uncaught NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'. A type with that name is already registered.
Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a function
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught TypeError: this._desugarBehaviors is not a function
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught TypeError: Cannot read property 'camelToDashCase' of undefined
Uncaught TypeError: this._desugarBehaviors is not a function
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught TypeError: Cannot read property 'apply' of undefined
brOOper commented 8 years ago

Removing the following imports of the iconset fa-all.html solved the problem.

<link rel="import" href="myproj/bower_components/iron-icon/iron-icon.html">
<link rel="import" href="myproj/bower_components/iron-iconset-svg/iron-iconset-svg.html">

I still think it's an issue.

zak905 commented 8 years ago

I got similar issue. It seems that Polymer.importHref() does not work in the super dev mode for some reason. It works only in production. I had to add the imports manually while working on dev mode.

manolo commented 8 years ago

This is not a gwt-polymer-elements issue but a SDM problem. Everything static in your app is handled by the SDM server, you should install those files in the public folder of our app and prepend to the path the module name.