Answer the question
In order to leave comments, you need to log in
Why is webpack devserver not finding pages?
The files are stored in the following structure:
--dist
----html
----css
----js
but devServer does not find the page, and you need to go to localhost:5000/html/page_name.html.
How to remove /html prefix from URL and why contentBase didn't work ? Thanks in advance.
const common = {
plugins: [
new Webpack.HotModuleReplacementPlugin()
],
devServer: {
contentBase: path.resolve(__dirname, '../dist/html'),
compress: false,
port: 5000,
index: 'frontpage.html',
open: true,
overlay: {
warnings: true,
errors: true
},
historyApiFallback: true,
inline: true
}
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question