0.1.0 • Published 6 years ago
assemble-webpack-loader v0.1.0
assemble-webpack-loader
Webpack loader for Assemble.
Install
yarn add assemble-webpack-loader -D
Usage
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
module: {
rules: [
{
test: /\.hbs$/,
use: [
{ loader: 'html-loader' },
{
loader: 'assemble-webpack-loader',
options: {
layouts: path.resolve('./src/html/layouts/**/*.hbs'),
partials: path.resolve('./src/html/partials/**/*.hbs'),
define: {
__TEST__: 'test'
}
}
}
]
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve('./src/html/pages/index.hbs'),
filename: 'index.html'
})
]
}
Example
Please see example.