I create a file index.ejs and write <%= htmlWebpackPlugin.options.title %> in line 90 of this file.
I write my loader like : { test: /\.ejs$/, loader: 'template-html-loader' },
but when I run command npm run webpack, I get an error: htmlWebpackPlugin is not defined in line 90 of index.ejs 。
Is html-webpack-plugin only works well with ejs-loader and handlebars-loader on current?
Actually this should work
...
,{
test: /\.ejs$/,
use: 'ejs-loader?variable=data'
}
...
new webpack.ProvidePlugin({
_: 'lodash'
}),
...
new htmlWebpackPlugin({
inject: false,
title: 'Chinastartup',
filename: 'index.html',
template: 'ejs-loader!index.ejs'
}),
version:
"webpack": "^2.2.1",
"html-webpack-plugin": "^2.28.0"
and my ejs-loader is work
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.