@poi/plugin-html-entry

0.2.3 • Public • Published

@poi/plugin-html-entry

This is a built-in Poi plugin which makes Poi support HTML entrypoint.

Features

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

Reloading

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.

License

MIT © EGOIST

Readme

Keywords

none

Package Sidebar

Install

npm i @poi/plugin-html-entry

Weekly Downloads

631

Version

0.2.3

License

MIT

Unpacked Size

14.4 kB

Total Files

8

Last publish

Collaborators

  • egoist
  • poi-owner
  • rem