1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- // let targetUrl = 'http://47.99.212.176:8000'
- let targetUrl = 'http://192.168.3.8:9001'
- module.exports = {
- // 调整内部的 webpack 配置。
- // 查阅 https://github.com/vuejs/vue-doc-zh-cn/vue-cli/webpack.md
- chainWebpack: () => {},
- configureWebpack: () => {},
- // 配置 webpack-dev-server 行为。
- devServer: {
- open: process.platform === 'darwin',
- host: '0.0.0.0',
- port: 9001,
- https: false,
- hotOnly: false,
- // 查阅 https://github.com/vuejs/vue-doc-zh-cn/vue-cli/cli-service.md#配置代理
- proxy: {
- '/contracts': {
- target: targetUrl,
- changeOrigin: true,
- ws: true,
- '^/contracts': '/contracts',
- xfwd: true
- },
- '/student-server': {
- target: targetUrl,
- changeOrigin: true,
- ws: true,
- '^/student-server': '/student-server',
- xfwd: true
- },
- '/api-cms': {
- target: targetUrl,
- changeOrigin: true,
- ws: true,
- '^/api-cms': '/api-cms',
- xfwd: true
- },
- '/order': {
- target: targetUrl,
- changeOrigin: true,
- ws: true,
- '^/order': '/order',
- xfwd: true
- }
- }, // string | Object
- },
- css: {
- loaderOptions: {
- less: {
- modifyVars: {
- // red: '#03a9f4',
- blue: '#14928A',
- // orange: '#f08d49',
- // 'text-color': '#111'
- }
- }
- }
- },
- }
|