first commit

This commit is contained in:
2026-06-26 16:56:14 +08:00
commit 40a1a2248b
20 changed files with 1635 additions and 0 deletions

30
vite.config.js Normal file
View File

@@ -0,0 +1,30 @@
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
function helloPlugin() {
console.log("hello Plugin")
return {
name: 'helloPlugin',
transform(src, id) {
// 只处理 src 目录下的文件,跳过 node_modules
if (!id.includes('/src/')) return null
// 生产环境:自动移除 console.log
if (process.env.NODE_ENV === 'production') {
const result = src.replace(/console\.log\([^)]*\);?/g, '')
return {code: result, map: null}
}
return null
}
}
}
// https://vite.dev/config/
export default defineConfig({
plugins: [
vue(),
helloPlugin()
],
clear:true
})