parcel-plugin-phtml
v1.0.1
Published
Parcel plugin for load html file as string that use .phtml extension
Downloads
5
Maintainers
Readme
# parcel-plugin-phtml
Parcel plugin for load html file as string that use .phtml extension
Installation
npm install --save-dev parcel-plugin-phtmlExample
my-component.phtml<my-component> lorem ipsum</my-component>index.jsimport html from './my-component.phtml'; console.log(html);index.html<!DOCTYPE html> <html> <head> <title>parcel-plugin-phtml demo</title> </head> <body> <h1>parcel-plugin-phtml demo</h1> <p>see your browser's console</p> <script type="text/javascript" src="index.js"></script> </body> </html>.posthtmlrc{ "plugins": { "posthtml-custom-elements": {} } }parcel index.htmloutput<div class="my-component"> test post-html </div>
good luck
