mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 16:48:39 +08:00
chore: 更新依赖
This commit is contained in:
+15
-12
@@ -131,16 +131,18 @@ export default function createVitePlugins(mode: string, isBuild = false) {
|
||||
transform: (code, id) => {
|
||||
if (/src\/main.ts$/.test(id)) {
|
||||
if (viteEnv.VITE_APP_DEBUG_TOOL === 'eruda') {
|
||||
code = code.concat(`
|
||||
import eruda from 'eruda'
|
||||
eruda.init()
|
||||
`)
|
||||
code = `
|
||||
${code}
|
||||
import eruda from 'eruda'
|
||||
eruda.init()
|
||||
`
|
||||
}
|
||||
else if (viteEnv.VITE_APP_DEBUG_TOOL === 'vconsole') {
|
||||
code = code.concat(`
|
||||
import VConsole from 'vconsole'
|
||||
new VConsole()
|
||||
`)
|
||||
code = `
|
||||
${code}
|
||||
import VConsole from 'vconsole'
|
||||
new VConsole()
|
||||
`
|
||||
}
|
||||
return {
|
||||
code,
|
||||
@@ -156,10 +158,11 @@ export default function createVitePlugins(mode: string, isBuild = false) {
|
||||
transform: (code, id) => {
|
||||
if (/src\/main.ts$/.test(id)) {
|
||||
if (viteEnv.VITE_APP_DISABLE_DEVTOOL) {
|
||||
code = code.concat(`
|
||||
import DisableDevtool from 'disable-devtool'
|
||||
DisableDevtool()
|
||||
`)
|
||||
code = `
|
||||
${code}
|
||||
import DisableDevtool from 'disable-devtool'
|
||||
DisableDevtool()
|
||||
`
|
||||
}
|
||||
return {
|
||||
code,
|
||||
|
||||
Reference in New Issue
Block a user