Example of how to to get a custom elements v1 working cross browser including ie11 (SO answer)
The files are already compiled and bundled, anyway if you want to see the scripts in action:
$ npm i
$ npm run build
$ npm run build:shim
Scripts are located in package.json
.
In order to get custom elements v1 working cross browser we need to add this native-shim (here more infos about it).
This works well in all major browsers (edge, safari, firefox etc..) but doesn't in ie11!
When we try to import it in ie11 we get a bunch of syntax errors because the shim is written with some es6.
A simple workaround (what i did in this repo) is to compile the shim to es5 and add it in addition of the es6 version (first es6 then es5 to ommit errors).
This isn't the cleanest solution, but at least it works.
I created this repo as answer to this SO question. Hopefully it will help some of you guys out.
Cheers