I need to add script tags that run before the compiled app script hosted in a project. Currently there isn't a way because the index.html file is compiled and dynamically injected, including externally resources. These script tags run async, which means the timing is wrong.
See this example: https://stackblitz.com/edit/es6-xx1xcd?file=index.html which fails in Chrome (partially due to compiling out ES6 classes that really need to be ES6 classes).
The external resource https://unpkg.com/@webcomponents/webcomponentsjs@1.0.18/custom-elements-es5-adapter.js needs to run before the project's js because it patches the environment, redefining HTMLElement. It runs, but not before the inlined index.js code and it's dependencies have.
I tried adding a <script> tag to index.html, but that didn't even run, presumably because of the way index.html content is injected into the page.
I need to add script tags that run before the compiled app script hosted in a project. Currently there isn't a way because the index.html file is compiled and dynamically injected, including externally resources. These script tags run async, which means the timing is wrong.
See this example: https://stackblitz.com/edit/es6-xx1xcd?file=index.html which fails in Chrome (partially due to compiling out ES6 classes that really need to be ES6 classes).
The external resource https://unpkg.com/@webcomponents/webcomponentsjs@1.0.18/custom-elements-es5-adapter.js needs to run before the project's js because it patches the environment, redefining HTMLElement. It runs, but not before the inlined index.js code and it's dependencies have.
I tried adding a
<script>tag to index.html, but that didn't even run, presumably because of the way index.html content is injected into the page.