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.
 
 
 
 
 
 

18 lines
584 B

import { defineConfig, loadEnv } from "vite";
import baseConfig from "./vite.config.base";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
// Load env file based on `mode` in the current working directory.
// Set the third parameter to '' to load all env regardless of the `VITE_` prefix.
const env = loadEnv(mode, process.cwd(), '');
const platform = env.PLATFORM || 'web';
// Load platform-specific config
const platformConfig = require(`./vite.config.${platform}`).default;
return {
...baseConfig,
...platformConfig,
};
});