Failed to construct 'HTMLElement'

前端 未结 2 460
无人共我
无人共我 2020-12-21 02:52

I run my-widget.js through babel (es2015 preset) to produce my-widget-es5.js. This causes an error with Polymer.

Class constructor         


        
2条回答
  •  清歌不尽
    2020-12-21 03:44

    Take a look at the link below. Just use the es5-bundled preset version and you should be ready to go. It will include conditional loading of the custom-elements-es5-adapter.json that @Supersharp mentioned.

    https://www.polymer-project.org/2.0/docs/tools/polymer-json#builds

提交回复
热议问题