$ npm install @poi/plugin-html-entry
This is a built-in Poi plugin which makes Poi support HTML entrypoint.
<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.
It processes certain HTML attributes:
<img>: src<image>: xlink:href<video>: src poster<source>: srcModifing HTML entry will trigger a full reload.
Your HTML entry will also be processed by lodash.template, see here for available template data.
MIT © EGOIST
© 2010 - cnpmjs.org x YWFE | Home | YWFE