You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
767 B
28 lines
767 B
import { defineConfig, loadEnv } from "vite";
|
|
import baseConfig from "./vite.config.base";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), '');
|
|
|
|
return {
|
|
...baseConfig,
|
|
define: {
|
|
'import.meta.env.VITE_PLATFORM': JSON.stringify('mobile'),
|
|
},
|
|
build: {
|
|
...baseConfig.build,
|
|
outDir: 'dist/mobile',
|
|
rollupOptions: {
|
|
...baseConfig.build.rollupOptions,
|
|
output: {
|
|
...baseConfig.build.rollupOptions.output,
|
|
manualChunks: {
|
|
// Mobile-specific chunk splitting
|
|
vendor: ['vue', 'vue-router', 'pinia'],
|
|
capacitor: ['@capacitor/core', '@capacitor/filesystem', '@capacitor/share'],
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
});
|