vue build시 lodash 템플릿을 사용하는 html이 만들어지는데
이를 핸들바의 템플릿을 사용하려고 한다.
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
indexPath: 'index.hbs',
configureWebpack: {
plugins: [
new HtmlWebpackPlugin({
inject: true,
template: 'public/index.hbs',
title: 'Hello world'
})
]
},
chainWebpack: config => {
config.module
.rule('hbs')
.test(/\.hbs$/)
.use('handlebars-loader')
.loader('handlebars-loader')
.end()
},
<html>
<title>{{ htmlWebpackPlugin.options.title }}</title>
</html>