When you're using JavaScript files as entrypoints, Poi will inject generated files into an HTML template and then output that HTML template as index.html
. However using an HTML file as entrypoint may be more straight-forward to many of you.
Luckily, you can do this with Poi too:
poi index.html --serve
It requires Poi 12.5.0 or above.
And you're good to go.
<link rel="stylesheet" href="./style.css">
<script src="https://polyfill.io/v3/polyfill.min.js?features=es2016"></script>
<script src="./main.js"></script>
Note that only relative paths will be processed by webpack, which means you can use absolute paths like https://...
or /static/foo.css
to reference external resources.
It processes certain HTML attributes:
<img>
:src
<image>
:xlink:href
<video>
:src
poster
<source>
:src
<link>
:href
<script>
:src
Modifing HTML entry will trigger a full reload.
Your HTML entry will also be processed by lodash.template, see here for available template data.