WebpackDevServer
Foxman-Plugin
如何启用
- cd path/to/project(以启用 foxman 的工程)
- npm i --save-dev foxman-plugins-webpack-dev-server
- 在 foxman.config.js 中新增 plugins 的配置项
const WebpackDevServer = ;const webpackConfig = ;moduleexports = ... plugins: webpackConfig devServerConfig: quiet: true noInfo: true ...
devServerConfig 默认配置项
optionsdevServerConfig = noInfo: false // display no info to console (only warnings and errors) quiet: false // display nothing to the console lazy: true // switch into lazy mode // that means no watching, but recompilation on every request watchOptions: aggregateTimeout: 300 // filename: "bundle.js", // delay after change (only lazy: false) // public path to bind the middleware to // use the same as in webpack headers: "X-Custom-Header": "yes" // custom headers stats: colors: true contentBase: webpackConfigoutputpath publicPath: webpackConfigoutputpublicPath hot: true // stats: webpackConf.devServer.stats // options for formating the statistics