fix: windows 里面运行小程序报错,BUSY,自动关闭服务
This commit is contained in:
parent
691fabeb78
commit
49b78596e9
@ -28,6 +28,8 @@ import ViteRestart from 'vite-plugin-restart'
|
|||||||
import { visualizer } from 'rollup-plugin-visualizer'
|
import { visualizer } from 'rollup-plugin-visualizer'
|
||||||
import imagemin from './vite-plugins/imagemin'
|
import imagemin from './vite-plugins/imagemin'
|
||||||
|
|
||||||
|
console.log('process.platform -> ', process.platform)
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default ({ command, mode }) => {
|
export default ({ command, mode }) => {
|
||||||
// console.log(mode === process.env.NODE_ENV) // true
|
// console.log(mode === process.env.NODE_ENV) // true
|
||||||
@ -134,6 +136,13 @@ export default ({ command, mode }) => {
|
|||||||
drop_debugger: env.VITE_DELETE_CONSOLE === 'true',
|
drop_debugger: env.VITE_DELETE_CONSOLE === 'true',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// 解决windows系统对微信小程序自动关闭服务的问题
|
||||||
|
watch:
|
||||||
|
process.platform === 'win32' // 检测是否为 windows 系统
|
||||||
|
? {
|
||||||
|
exclude: ['node_modules/**', '/__uno.css'],
|
||||||
|
}
|
||||||
|
: null,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user