0.0.5 • Published 6 years ago
webpack-dev-server-bird v0.0.5
This package is for the application of bird-proxy-middleware, which is set up on the basis of webpack-dev-server
Getting Started
First thing's first, install the module:
npm install webpack-dev-server-bird --save-devUsage
The configuration of using this package is consistent with that of webpack-dev-server. The only difference is that bird-proxy-middleware replaces the original proxy.
Bird Proxy Configure
Suppose your project is built by vue-cli2.
config/index.js
module.exports = {
dev: {
// ...other config
birdfilePath: path.resolve(__dirname, '../bird/birdfile.js'), // absolute path !!!
// ...
},
// ...
} build/webpack.dev.conf.js
devServer: {
birdfilePath: config.dev.birdfilePath
}package.json
"scripts": {
"dev": "webpack-dev-server-bird --inline --config build/webpack.dev.conf.js",
// ...
},that's all.
Then use your bird-proxy-middleware, and enjoy it 😸