Skip to content

Commit

Permalink
fix: 修正线上_plugin-vue_export-helper未找到的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiuChen committed Apr 20, 2023
1 parent fd00d2d commit 2038b11
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import postBuildPlugin from './build/postBuildPlugin'

// https://vitejs.dev/config/
export default defineConfig({
base: './',
resolve: {
alias: {
'@': '/src'
Expand All @@ -21,7 +22,18 @@ export default defineConfig({
// external
build: {
rollupOptions: {
external: ['electron', 'utools', 'process', 'vm', 'fs']
external: ['electron', 'utools', 'process', 'vm', 'fs'],
output: {
sanitizeFileName(name) {
const INVALID_CHAR_REGEX = /[\x00-\x1F\x7F<>*#"{}|^[\]`;?:&=+$,]/g
const DRIVE_LETTER_REGEX = /^[a-z]:/i

const match = DRIVE_LETTER_REGEX.exec(name)
const driveLetter = match ? match[0] : ''
// substr 是被淘汰語法,因此要改 slice
return driveLetter + name.slice(driveLetter.length).replace(INVALID_CHAR_REGEX, '')
}
}
}
},
esbuild: {
Expand Down

0 comments on commit 2038b11

Please sign in to comment.