|
@@ -21,6 +21,7 @@ import AutoImport from 'unplugin-auto-import/vite'
|
|
|
import ViteRestart from 'vite-plugin-restart'
|
|
import ViteRestart from 'vite-plugin-restart'
|
|
|
import { copyNativeRes } from './vite-plugins/copyNativeRes'
|
|
import { copyNativeRes } from './vite-plugins/copyNativeRes'
|
|
|
import Components from '@uni-helper/vite-plugin-uni-components'
|
|
import Components from '@uni-helper/vite-plugin-uni-components'
|
|
|
|
|
+import updatePackageJson from './scripts/updatePackageJson'
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
// https://vitejs.dev/config/
|
|
|
export default async ({ command, mode }) => {
|
|
export default async ({ command, mode }) => {
|
|
@@ -129,6 +130,7 @@ export default async ({ command, mode }) => {
|
|
|
dts: 'src/types/components.d.ts', // 自动生成的组件类型声明文件路径(用于 TypeScript 支持)
|
|
dts: 'src/types/components.d.ts', // 自动生成的组件类型声明文件路径(用于 TypeScript 支持)
|
|
|
}),
|
|
}),
|
|
|
Uni(),
|
|
Uni(),
|
|
|
|
|
+ updatePackageJson(),
|
|
|
],
|
|
],
|
|
|
define: {
|
|
define: {
|
|
|
__UNI_PLATFORM__: JSON.stringify(UNI_PLATFORM),
|
|
__UNI_PLATFORM__: JSON.stringify(UNI_PLATFORM),
|