我有一个express
我在我的应用程序中使用的 API,所以我正在使用webpack-dev-middleware
和webpack-hot-middleware
.
我试图弄清楚当我通过 APIwebpack --color
使用时如何获得该选项。webpack
这就是我现在所拥有的:
const webpack = require('webpack')
const webpackConfig = require('../../webpack.config')
const compiler = webpack(webpackConfig)
const webpackDevMiddleware = require('webpack-dev-middleware')(compiler, {
noInfo: true
})
const webpackHotMiddleware = require('webpack-hot-middleware')(compiler)
app.use(webpackDevMiddleware)
app.use(webpackHotMiddleware)
我目前正在使用webpack@2.2.0-rc.3
.