webpack-dev-server-bird
v0.0.5
Published
This package is for the application of bird-proxy-middleware, which is set up on the basis of webpack-dev-server.
Downloads
3
Readme
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-dev
Usage
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 😸