UNPKG

uni-query

Version:

🐠 为uniapp设计的开源组件库,专注最重要的核心组件

32 lines (29 loc) 805 B
import { defineConfig } from 'vite' import uni from '@dcloudio/vite-plugin-uni' const INVALID_CHAR_REGEX = /[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g const DRIVE_LETTER_REGEX = /^[a-z]:/i // https://vitejs.dev/config/ export default defineConfig({ plugins: [ uni(), ], build: { rollupOptions: { output: { // https://github.com/rollup/rollup/blob/master/src/utils/sanitizeFileName.ts sanitizeFileName(name) { const match = DRIVE_LETTER_REGEX.exec(name) const driveLetter = match ? match[0] : "" return ( driveLetter + name.slice(driveLetter.length).replace(INVALID_CHAR_REGEX, "") ) }, }, }, }, server: { host: "0.0.0.0", port: 8080 } })