Using HTML Entrypoint beta

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.


Process local scripts and styles

<link rel="stylesheet" href="./style.css">
<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.

Process certain HTML attributes

It processes certain HTML attributes:

  • <img>: src
  • <image>: xlink:href
  • <video>: src poster
  • <source>: src


Modifing HTML entry will trigger a full reload.

Template Interpolations

Your HTML entry will also be processed by lodash.template, see here for available template data.

Last Updated: 9/17/2019, 6:04:51 PM