瀏覽代碼

first commit

xubo 1 年之前
父節點
當前提交
80dc70fa20
共有 2 個文件被更改,包括 2 次插入28 次删除
  1. 1 1
      src/App.vue
  2. 1 27
      vite.config.js

+ 1 - 1
src/App.vue

@@ -23,7 +23,7 @@ export default {
       const formData = new FormData();
       formData.append('file', this.selectedFile, this.selectedFile.name);
 
-      axios.post('http://127.0.0.1:8000/api/upload', formData, {
+      axios.post('https://dev.maxwebx.cn/api/upload', formData, {
         headers: {
           'Content-Type': 'multipart/form-data'
         }

+ 1 - 27
vite.config.js

@@ -5,33 +5,7 @@ import vue from '@vitejs/plugin-vue'
 
 // https://vitejs.dev/config/
 export default defineConfig({
-  server: {
-    port: 5173,
-    host: '0.0.0.0',
-    base: './',
-    cors: true,
-    open: true,
-    proxy: {
-      '/api': {
-        target: "http://127.0.0.1:8000",
-        changeOrigin: true,
-        rewrite: (path) => path.replace(/^\/api/, "api"),
-      },
-      //解决npm run build报错
-      build: {
-        chunkSizeWarningLimit: 1500,
-        rollupOptions: {
-          output: {
-            manualChunks(id) {
-              if (id.includes('node_modules')) {
-                return id.toString().split('node_modules/')[1].split('/')[0].toString();
-              }
-            }
-          }
-        }
-      }
-    }
-  },
+
   plugins: [
     vue(),
   ],