This package has been deprecated

Author message:

This package has been renamed to @deraw/vue-cli-plugin-proxy.

@cnamts/vue-cli-plugin-proxy

2.2.1 • Public • Published

VueDot

CNAM – Vue CLI plugin proxy

This plugin is meant to provide all http-proxy-middleware options to vue-cli.

NPM Version NPM Downloads License

Issue

See the issue than initiated this plugin (#2320)

As Easy as 1, 2, 3

Install

yarn add @cnamts/vue-cli-plugin-proxy # OR npm install @cnamts/vue-cli-plugin-proxy

Use

// vue.config.js
module.exports = {
    pluginOptions: {
        proxy: {
            enabled: true,
            context: '',
            options: {
                // ...
            }
        }
    }
}

You're done! 🎉

See http-proxy-middleware for options object to pass to the plugin.

Object examples

  • First example of the docs:
// vue.config.js
module.exports = {
    pluginOptions: {
        proxy: {
            enabled: true,
            context: '/api',
            options: {
                target: 'http://www.example.org',
                changeOrigin: true
            }
        }
    }
}
  • v1.0.0 default:
// vue.config.js
module.exports = {
    pluginOptions: {
        proxy: {
            enabled: true,
            context: ['/**', '!/dist/**'],
            options: {
                target: 'http://127.0.0.1:8000',
            }
        }
    }
}

License

Vue CLI Plugin Proxy is licensed under MIT License.

Readme

Keywords

Package Sidebar

Install

npm i @cnamts/vue-cli-plugin-proxy

Weekly Downloads

11

Version

2.2.1

License

MIT

Unpacked Size

15.3 kB

Total Files

17

Last publish

Collaborators

  • 4dr1en
  • vivvi
  • davidfyon
  • deraw
  • cnam-owner