Your Name 4 years ago
parent
commit
4c18bacf26
2 changed files with 35 additions and 4 deletions
  1. 4 4
      package.json
  2. 31 0
      vue.config.js

+ 4 - 4
package.json

@@ -1,9 +1,9 @@
 {
-  "name": "y",
-  "version": "1.0.0",
+  "name": "out.yoqi.me",
+  "version": "1.2.0",
   "private": true,
-  "description": "",
-  "author": "",
+  "description": "国外网站分享。",
+  "author": "liuyuqi.gov@msn.cn",
   "scripts": {
     "serve": "vue-cli-service serve",
     "build": "vue-cli-service build",

+ 31 - 0
vue.config.js

@@ -0,0 +1,31 @@
+module.exports = {
+    publicPath: '',
+    productionSourceMap: false,
+    devServer: {
+        port: 8080,
+        open: true,
+        disableHostCheck: true,
+        proxy: {  //配置跨域
+            '/api': {
+                target: 'https://out.yoqi.me/',
+                ws: false,
+                changOrigin: true,  //允许跨域
+                pathRewrite: {
+                    '^/api': ''
+                }
+            }
+        }
+    },
+    configureWebpack: {
+        resolve: {
+            alias: {
+                // '@': 'src',
+                assets: '@/assets',
+                common: '@/common',
+                components: '@/components',
+                api: '@/api',
+                views: '@/views'
+            }
+        }
+    }
+};