andreasbm / weightless

High-quality web components with a small footprint
MIT License
377 stars 31 forks source link

"emitDecoratorMetadata": true causes problems for IE11 #87

Open brettwillis opened 5 years ago

brettwillis commented 5 years ago

The TypeScript config has "emitDecoratorMetadata": true, which causes "design:type" metadata to be emitted in decorators in the build output.

Firstly, I'm not sure if runtime type metadata is necessary here, please review.

Secondly, the metadata in the decorators cause incompatibility with IE11, because some properties with type EventTarget cause the error in IE11:

'EventTarget' is undefined

Including polyfills for EventTarget seem to cause me trouble with the WebComponent polyfills... I haven't sunk to much time into this approach.

Anyway, may I suggest "emitDecoratorMetadata": false, please?