I'm using a pug/jade template for index.html. If I have an empty build directory, run webpack-dev-server (which handles processing the template), there's no index.html actually output to the build directory. An abbreviated version of my webpack.config.js is below.
const config = {
entry: 'client/index.jsx',
output: {
path: 'build',
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'react-hot!babel',
exclude: /node_modules/
},
{
test: /\.pug$/,
loader: 'jade'
}
]
},
plugins: [
new HtmlWebpackPlugin({
filename: 'build/index.html',
template: 'index.pug',
cache: false
}),
],
devServer: {
contentBase: OUTPUT_PATH,
}
};
This config file works just fine if I run webpack directly. It's when I run webpack-dev-server that nothing is output.
Nevermind. I found the harddisk plugin which solves this exact problem.
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
Nevermind. I found the harddisk plugin which solves this exact problem.