Convert the code above to the code below:
devServer: {
static: path.resolve(__dirname, 'dist'),
port: 9000
}
It's important to set clean
to false
. It happened to me...
webpackConfig = {
output: {
clean: false
}
}
Use static
instead, as contentBase
is deprecated in the latest Webpack v5:
devServer: {
static: {
directory: path.join(__dirname, "./")
}
}
Read Similar Articles
- Calling SignalR hub from Web API controller in ASP.NET Core
- [Simple Trick]-Set Different Color For Each Bar in a Bar Chart in ChartJS
- How to use Merge Statement in the SQL Server
- How to use Group By in SQL Server query?
- How to Use EXCEPT Operator with an example in Sql
- Solved : Error starting applicationcontext. to display the condition evaluation report re-run your application with 'debug' enabled
- [Solved]-"Spring Boot: Consider defining a bean named 'entityManagerFactory' in your configuration"
- Error: cannot import name 'PDFDocument' from 'pdfminer.pdfparser'