ECT templates compiler for webpack4
npm install webpack-ect-loaderThe ect templates compiler for webpack.
This includes a html formatter pretty.
```
npm i -D webpack-ect-loader
This works with the following helper packages
- html-loader
- html-webpack-plugin
` javascript``
module.exports = {
module: {
rules: [
{
test: /\.ect$/,
use: [
{
loader: 'html-loader',
options: {
}
},
{
loader: 'ect-loader',
options: {
root: path.resolve(__dirname, 'src/ect'),
}
}
]
},
]
},
plugins: [
new HtmlWebpackPlugin({
template: 'src/index.ect',
filename: 'index.[contenthash].html'
})
]
};