0.1.1 • Published 5 years ago

@pigs/plugin-html-entry v0.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

@pigs/plugin-html-entry

This is a built-in Pigs plugin which makes Pigs 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