forked from jsnbuchanan/crowd-funder-for-time-pwa
feat: implement dynamic platform entry point system
- Add src/main.ts as dynamic entry point that loads platform-specific code - Update index.html to use dynamic main.ts instead of hardcoded main.web.ts - Remove external capacitor config from vite.config.common.mts to ensure proper bundling - Enables consistent platform detection across all build targets - Use proper logger utility instead of console.log for platform detection logging
This commit is contained in:
@@ -8,7 +8,6 @@ import { fileURLToPath } from 'url';
|
||||
// Load environment variables
|
||||
dotenv.config({ path: `.env.${process.env.NODE_ENV}` })
|
||||
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
@@ -36,9 +35,6 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
|
||||
assetsDir: 'assets',
|
||||
chunkSizeWarningLimit: 1000,
|
||||
rollupOptions: {
|
||||
external: isNative
|
||||
? ['@capacitor/app']
|
||||
: [],
|
||||
output: {
|
||||
format: 'esm',
|
||||
generatedCode: {
|
||||
|
||||
Reference in New Issue
Block a user