I'm learning Webpack and trying the plugin webpack-dev-server
. I'm learning by trying to change its settings in webpack.config.js
.
Before change:
output: {
path: path.resolve(__dirname, 'dist')
},
devServer: {
contentBase: path.join(__dirname, 'dist')
// ...
}
After change:
output: {
path: path.resolve(__dirname, '/dist/')
},
devServer: {
contentBase: path.join(__dirname, '/dist/'),
open: true,
// ...
}
The result:
- The
dist/
folder was not generated in my project folder. - While the browser was still opened and serving the page with .js being applied.
So it seems like the dist
folder is generated elsewhere? I'm also considering that it's because of my wrong settings of output { path: ... }
or devServer: { contentBase: ... }
.
btw, would html-webpack-plugin
generate the output in a temporary folder if these two path settings were wrong?