@cnamts/vue-cli-plugin-proxy
Advanced tools
@@ -5,4 +5,4 @@ var proxy = require('http-proxy-middleware'); | ||
api.configureDevServer((app) => { | ||
app.use(proxy(['/**', '!/dist/**'], { target: 'http://127.0.0.1:8000' })); | ||
app.use(proxy(projectOptions.pluginOptions.proxy)); | ||
}); | ||
}; |
{ | ||
"name": "@cnamts/vue-cli-plugin-proxy", | ||
"version": "1.0.0", | ||
"description": "", | ||
"version": "2.0.0", | ||
"description": "Provide all http-proxy-middleware options to vue-cli", | ||
"keywords": [ | ||
"vue", | ||
"vuejs2", | ||
"vue-cli", | ||
"proxy" | ||
], | ||
"homepage": "https://github.com/assurance-maladie-digital/vue-cli-plugin-proxy/blob/master/README.md", | ||
"bugs": { | ||
"url": "https://github.com/assurance-maladie-digital/vue-cli-plugin-proxy/issues", | ||
"email": "deraw@outlook.fr" | ||
}, | ||
"license": "MIT", | ||
"author": "Dylan Broussard <deraw@outlook.fr>", | ||
"main": "index.js", | ||
"author": "Dylan Broussard <deraw@outlook.fr>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/assurance-maladie-digital/vue-cli-plugin-proxy" | ||
}, | ||
"dependencies": { | ||
"http-proxy-middleware": "^0.18.0" | ||
"http-proxy-middleware": "^0.19.0" | ||
} | ||
} |
@@ -1,1 +0,74 @@ | ||
vue-cli-plugin-proxy | ||
<p align="center"> | ||
<a | ||
href="https://assurance-maladie-digital.github.io/vue-cli-plugin-proxy/" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<img | ||
width="280" | ||
src="./docs/img/vue.js.svg" | ||
alt="VueDot" | ||
> | ||
</a> | ||
</p> | ||
<h1 align="center">CNAM – Vue CLI plugin proxy</h1> | ||
<p align="center">This plugin is meant to provide all [http-proxy-middleware](https://www.npmjs.com/package/http-proxy-middleware) options to vue-cli.</p> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/@cnamts/vue-cli-plugin-proxy"> | ||
<img | ||
src="https://img.shields.io/npm/v/@cnamts/vue-cli-plugin-proxy.svg?style=flat-square" | ||
alt="NPM Version" | ||
> | ||
</a> | ||
<a href="https://www.npmjs.com/package/@cnamts/vue-cli-plugin-proxy"> | ||
<img | ||
src="https://img.shields.io/npm/dw/@cnamts/vue-cli-plugin-proxy.svg?style=flat-square" | ||
alt="NPM Downloads" | ||
> | ||
</a> | ||
<a | ||
href="https://github.com/assurance-maladie-digital/vue-cli-plugin-proxy/blob/master/LICENSE"> | ||
<img | ||
src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square" | ||
alt="License" | ||
> | ||
</a> | ||
</p> | ||
## Issue | ||
See the issue than initiated this plugin: [#2320](https://github.com/vuejs/vue-cli/issues/2320) | ||
## As Easy as 1, 2, 3 | ||
### Install | ||
``` bash | ||
yarn add @cnamts/vue-cli-plugin-proxy # OR npm install @cnamts/vue-cli-plugin-proxy | ||
``` | ||
### Use | ||
``` js | ||
// vue.config.js | ||
module.exports = { | ||
pluginOptions: { | ||
proxy: { | ||
options: { | ||
// ... | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
### You're done! 🎉 | ||
See [http-proxy-middleware](https://www.npmjs.com/package/http-proxy-middleware#example) for `options` object to pass to the plugin. | ||
## License | ||
Vue CLI plugin proxy is licensed under a [MIT License](./LICENSE). |
Sorry, the diff of this file is not supported yet
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
31140
51.71%7
75%1
-50%0
-100%75
7400%0
-100%