0.1.6 ā¢ Published 3 years ago
webpack-devtool-plugin v0.1.6
Help developers switch agents Online
š Homepage
Prerequisites
- npm >=5.5.0
- node >=9.3.0
Install
npm install webpack-devtool-plugin -D
usage
Use in webpack.config.js
const WebpackDevtoolPlugin = require('webpack-devtool-plugin');
module.exports = {
devServer: {
proxy: {
+ '/':WebpackDevtoolPlugin.getProxyConfig()
}
},
plugins: [
+ new WebpackDevtoolPlugin({
+ proxyArr: [
+ { value: "http://a.com" },
+ { value: "http://b.com" },
+ { value: "http://c.com" },
+ ],
+ }),
],
}
Use in vue
// vue.config.js
const CopyWebpackPlugin = require("webpack-devtool-plugin")
module.exports = {
devServer:{
proxy:{
"/": CopyWebpackPlugin.getProxyConfig()
}
},
configureWebpack:{
plugins: [
new CopyWebpackPlugin({
proxyArr:[{
value:'http://localhost:3001'
}]
})
]},
}
DevToolsPlugin options
Name | Type | value |
---|---|---|
proxyArr | Array<{value:string}> | {value:'http://a.com'} |
Author
š¤ wenhaoming 435203093@qq.com
- Website: http://whm.zone
- Github: @wen-haoming
š¤ Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a āļø if this project helped you!
š License
Copyright Ā© 2021 wenhaoming <435203093@qq.com>. This project is MIT licensed.
This README was generated with ā¤ļø by readme-md-generator