beidou-plugin-webpack
v0.3.2
Published
webpack middleware
Downloads
11
Readme
beidou-plugin-webpack
webpack dev server for local environment
Features
- Serve jsx/js source
- Serve less/scss/css source
- Support hot module replacement(hmr)
Configuration
- config/plugin.default.js:
exports.webpack = {
enable: true,
package: 'beidou-plugin-webpack',
env: ['local', 'unittest']
}
- config/config.local.js
exports.webpack = {
//[optional] default to 'beidou-plugin-webpack/config/webpack.default.config.js'
defaultConfig: 'path of webpack config',
//[optional] the path of request should be transfered to webpack. e.g HMR: /__webpack_hmr
path: [],
//[optional]
noInfo: false,
//[optional]
quiet: false,
//[optional]
lazy: false,
//[optional]
watchOptions: {
aggregateTimeout: 300,
poll: true,
},
//[optional]
headers: { 'X-Custom-Header': 'yes' },
//[optional]
stats: {
colors: true,
chunks: false,
},
//[optional]
defaultEntryName: 'index.jsx',
//[optional]
outputPath: './build',
//[optional]
publicPath: '/build',
//[optional] hot module replacement config
hmr: {
path: '__webpack_hmr',
timeout: '20000',
heartbeat: '10000',
}
};