Install
npm install --save-dev documentfragment-loader
Usage
// webpack.config.js
{
test: /\.(html)$/,
use: ['documentfragment-loader', 'html-loader']
}
<!-- test.html -->
<div>
Hello world!
</div>
// use in code
import htmlBlock from './test.html';
var block = htmlBlock();