webpack-dev-server-bird

0.0.5 • Public • Published

webpack-dev-server-bird

npm

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 😸

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-dev-server-bird

Weekly Downloads

6

Version

0.0.5

License

MIT

Unpacked Size

445 kB

Total Files

18

Last publish

Collaborators

  • angusyang9