28 lines
493 B
JavaScript
28 lines
493 B
JavaScript
import { defineConfig } from 'vite'
|
|
import uni from '@dcloudio/vite-plugin-uni'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
uni({
|
|
vueOptions: {
|
|
template: {
|
|
compilerOptions: {
|
|
// 保留微信 JSSDK 相关的全局变量
|
|
isCustomElement: (tag) => tag === 'wx'
|
|
}
|
|
}
|
|
}
|
|
})
|
|
],
|
|
build: {
|
|
rollupOptions: {
|
|
external: ['wx'],
|
|
output: {
|
|
globals: {
|
|
wx: 'wx'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|