Browse Source

修正打包bug,
Signed-off-by: caner <5658514@qq.com>

caner 3 years ago
parent
commit
5fc4237c1f
8 changed files with 7 additions and 16 deletions
  1. 2 0
      .env
  2. 0 3
      .env.development
  3. 0 3
      .env.production
  4. 2 3
      .eslintrc.cjs
  5. 0 6
      .vs/VSWorkspaceState.json
  6. BIN
      .vs/slnx.sqlite
  7. 1 0
      package.json
  8. 2 1
      vite.config.ts

+ 2 - 0
.env

@@ -0,0 +1,2 @@
+VITE_API_HOST=127.0.0.1
+VITE_API_PORT=3000

+ 0 - 3
.env.development

@@ -1,3 +0,0 @@
-# api 参数
-VITE_APP_API_HOST=127.0.0.1
-VITE_APP_API_PORT=3000

+ 0 - 3
.env.production

@@ -1,3 +0,0 @@
-# api 参数
-VITE_APP_API_HOST=
-VITE_APP_API_PORT=

+ 2 - 3
.eslintrc.js → .eslintrc.cjs

@@ -6,10 +6,9 @@ module.exports = {
     es2021: true
     es2021: true
   },
   },
   parserOptions: {
   parserOptions: {
-    ecmaVersion: 12,
+    ecmaVersion: "latest",
     parser: '@typescript-eslint/parser',
     parser: '@typescript-eslint/parser',
-    sourceType: "module",
-    requireConfigFile: false
+    sourceType: "module"
   },
   },
   extends: [
   extends: [
     'plugin:vue/vue3-recommended',
     'plugin:vue/vue3-recommended',

+ 0 - 6
.vs/VSWorkspaceState.json

@@ -1,6 +0,0 @@
-{
-  "ExpandedNodes": [
-    ""
-  ],
-  "PreviewInSolutionExplorer": false
-}

BIN
.vs/slnx.sqlite


+ 1 - 0
package.json

@@ -27,6 +27,7 @@
     "less": "^4.1.3",
     "less": "^4.1.3",
     "typescript": "^4.6.4",
     "typescript": "^4.6.4",
     "vite": "^3.0.6",
     "vite": "^3.0.6",
+    "vite-plugin-eslint": "^1.8.0",
     "vue-tsc": "^0.39.5"
     "vue-tsc": "^0.39.5"
   }
   }
 }
 }

+ 2 - 1
vite.config.ts

@@ -1,5 +1,6 @@
 import { defineConfig } from 'vite'
 import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
 import vue from '@vitejs/plugin-vue'
+import eslint from 'vite-plugin-eslint'
 import path from 'path'
 import path from 'path'
 
 
 // https://vitejs.dev/config/
 // https://vitejs.dev/config/
@@ -14,7 +15,7 @@ export default defineConfig({
       '@': path.resolve(__dirname, './src')
       '@': path.resolve(__dirname, './src')
     }
     }
   },
   },
-  plugins: [vue()],
+  plugins: [vue(), eslint({ fix: true, include: ['**/*.ts', '**/*.vue'] })],
   server: {
   server: {
     host: 'localhost',
     host: 'localhost',
     port: 6547,
     port: 6547,