This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://webpack.github.io/docs/webpack-dev-server.html#api | |
If mocking API is needed when running webpack dev server, you can set it up in your webpack config as follows: | |
devServer: { | |
setup: function(app) { | |
// Here you can access the Express app object and add your own custom middleware to it. | |
// For example, to define custom handlers for some paths: | |
// app.get('/some/path', function(req, res) { | |
// res.json({ custom: 'response' }); | |
// }); | |
}, |