Answer the question
In order to leave comments, you need to log in
Webpack stopped following changes after setting proxy, how to solve?
Good day. Set up Webpack and devServer, through a proxy on Open Server (for reading PHP code and DB).
DevServer listens to the build folder (where the project is going after npm run build), all changes are made in the src folder (where the build folder is going from). But after I make edits to src/index.html and save them, devServer still doesn't see the changes in build/index.php (because they aren't physically there since there was no `npm run build`), but Before that everything worked fine as it should. And building the project after each CTRL + S is very time consuming.
I hope someone understands my question. Thank you)
devServer: {
historyApiFallback: true,
contentBase: paths.build,
publicPath: paths.src,
compress: true,
open: true,
host: `localhost`,
port: 3000,
hot: true,
watchContentBase: true,
proxy: {
'**': {
target: `http://webpack/teamplate/dist`,
}
}
},
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