build: d73775f9-b787-4b17-921e-f13c97d46940

This commit is contained in:
AppCakes
2026-05-27 18:16:42 +00:00
commit bb8224c752
90 changed files with 5284 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import { defineConfig, type Plugin } from 'vite';
import react from '@vitejs/plugin-react';
const injectRouterBasename: Plugin = {
name: 'inject-router-basename',
enforce: 'pre',
transform(code, id) {
if (!/\.[jt]sx$/.test(id)) return null;
const next = code.replace(
/<IonReactRouter(?![^>]*basename)([^>]*)>/g,
'<IonReactRouter$1 basename={import.meta.env.BASE_URL}>',
);
return next === code ? null : next;
},
};
export default defineConfig({
plugins: [injectRouterBasename, react()],
server: {
host: '0.0.0.0',
port: 8100,
allowedHosts: true,
hmr: {
clientPort: process.env.HMR_CLIENT_PORT ? parseInt(process.env.HMR_CLIENT_PORT) : undefined,
},
},
css: { devSourcemap: false },
});