Skip to content

Offer a way to take full control of index.html #188

@justinfagnani

Description

@justinfagnani

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions