qn-html-loader
v0.0.3
Published
qn-html-loader ======
Downloads
5
Readme
qn-html-loader
Webpack loader which loads HTML files as string content & extract dependencies.
Sample
<p>
<svg class="icon-ban" qn-href="utils/base/style/icons/ban.svg"></svg>
</p>
=>
module.exports = '<p>\n ' + '<svg class="icon-ban">' + '<use xlink:href="' + require("utils/base/style/icons/ban.svg") + ' /></svg>\n</p>';
Install
npm i qn-html-loader --save-dev
Usage
webpack.config.js
:
{
// ...
module: {
loaders: [
// ...
{
test: /\.html$/,
loader: 'qn-html'
},
// ...
]
}
// ...
}