增加前端格式检查配置
This commit is contained in:
+29
-29
@@ -1,11 +1,11 @@
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { defineConfig } from "vite";
|
||||
import AutoImport from "unplugin-auto-import/vite";
|
||||
import Components from "unplugin-vue-components/vite";
|
||||
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
||||
import { VantResolver } from "@vant/auto-import-resolver";
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { defineConfig } from 'vite'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||
import { VantResolver } from '@vant/auto-import-resolver'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
@@ -19,50 +19,50 @@ export default defineConfig({
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
"/api": "http://127.0.0.1:8080",
|
||||
'/api': 'http://127.0.0.1:8080',
|
||||
},
|
||||
allowedHosts: [
|
||||
'221329.cc.cd',
|
||||
"d4aa-77-93-89-84.ngrok-free.app",
|
||||
"frp-bus.com",
|
||||
"www.u499731.nyat.app",
|
||||
"fn.221329.xyz"
|
||||
'd4aa-77-93-89-84.ngrok-free.app',
|
||||
'frp-bus.com',
|
||||
'www.u499731.nyat.app',
|
||||
'fn.221329.xyz',
|
||||
],
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
onwarn(warning, warn) {
|
||||
const isVueusePureWarning =
|
||||
warning.message.includes("#__PURE__") &&
|
||||
typeof warning.id === "string" &&
|
||||
warning.id.includes("node_modules/@vueuse/core/");
|
||||
if (isVueusePureWarning) return;
|
||||
warn(warning);
|
||||
warning.message.includes('#__PURE__') &&
|
||||
typeof warning.id === 'string' &&
|
||||
warning.id.includes('node_modules/@vueuse/core/')
|
||||
if (isVueusePureWarning) return
|
||||
warn(warning)
|
||||
},
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (!id.includes("node_modules")) return;
|
||||
if (id.includes("element-plus") || id.includes("@element-plus")) {
|
||||
return "vendor-element-plus";
|
||||
if (!id.includes('node_modules')) return
|
||||
if (id.includes('element-plus') || id.includes('@element-plus')) {
|
||||
return 'vendor-element-plus'
|
||||
}
|
||||
if (id.includes("vant") || id.includes("@vant")) {
|
||||
return "vendor-vant";
|
||||
if (id.includes('vant') || id.includes('@vant')) {
|
||||
return 'vendor-vant'
|
||||
}
|
||||
if (id.includes("vue") || id.includes("pinia")) {
|
||||
return "vendor-vue";
|
||||
if (id.includes('vue') || id.includes('pinia')) {
|
||||
return 'vendor-vue'
|
||||
}
|
||||
if (id.includes("axios")) {
|
||||
return "vendor-axios";
|
||||
if (id.includes('axios')) {
|
||||
return 'vendor-axios'
|
||||
}
|
||||
return "vendor";
|
||||
return 'vendor'
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user