Hello, I need this plugin, but when I use it in webpack 2, the generated script tag is of the form:
<script type="text/javascript" src="static/js/bundle.js"></script>
instead of:
<script type="text/javascript" src="/static/js/bundle.js"></script>
Note: with the same plugin options, it works as expected in Webpack 1.
Here are the relevant parts of webpack conf:
entry: [
paths.appIndexJs,
publicPath,
],
output: {
pathinfo: true,
path: paths.appBuild,
filename: 'static/js/bundle.js',
},
// (...)
plugins: [
new HtmlWebpackPlugin({
inject: true,
template: paths.appHtml,
}),
What am I doing wrong?
I added output.publicPath = '/' and it was OK, I think it would be nice to have this in the examples and/or doc...
so why i have to set output.publicPath: '/' ?
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.
Most helpful comment
I added output.publicPath = '/' and it was OK, I think it would be nice to have this in the examples and/or doc...