webpack-dev-server-bird
bird-proxy-middleware, which is set up on the basis of webpack-dev-server
This package is for the application ofGetting 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
moduleexports = dev: // ...other config birdfilePath: path // absolute path !!! // ... // ...
build/webpack.dev.conf.js
devServer: birdfilePath: configdevbirdfilePath
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 😸