File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,10 +75,8 @@ The application bootstraps in `src/main.tsx`:
7575``` typescript
7676async function bootstrap() {
7777 // 1. Start MSW Mock Server (Critical: Must be first)
78- if (process .env .NODE_ENV === ' development' ) {
79- console .log (' 🛑 Bootstrapping Mock Server...' );
80- await startMockServer ();
81- }
78+ console .log (' 🛑 Bootstrapping Mock Server...' );
79+ await startMockServer ();
8280
8381 // 2. Initialize Clients (Must happen AFTER MSW is ready)
8482 console .log (' 🔌 Connecting Clients...' );
@@ -93,7 +91,10 @@ async function bootstrap() {
9391 );
9492}
9593
96- bootstrap ();
94+ bootstrap ().catch (err => {
95+ console .error (" FATAL: Application failed to start" , err );
96+ document .body .innerHTML = ` <div style="color:red; padding: 20px;"><h1>Application Error</h1><pre>${err .message }</pre></div> ` ;
97+ });
9798```
9899
99100### 3. Client Connection
Original file line number Diff line number Diff line change @@ -33,6 +33,6 @@ async function bootstrap() {
3333}
3434
3535bootstrap ( ) . catch ( err => {
36- console . error ( "FATAL: Application failed to start" , err ) ;
37- document . body . innerHTML = `<div style="color:red; padding: 20px;"><h1>Application Error</h1><pre>${ err . message } </pre></div>` ;
36+ console . error ( "FATAL: Application failed to start" , err ) ;
37+ document . body . innerHTML = `<div style="color:red; padding: 20px;"><h1>Application Error</h1><pre>${ err . message } </pre></div>` ;
3838} ) ;
Original file line number Diff line number Diff line change @@ -41,8 +41,11 @@ export default defineConfig(({ mode }) => ({
4141 transformMixedEsModules : true
4242 } ,
4343 rollupOptions : {
44+ // Suppress warnings for optional dynamic imports in runtime
4445 onwarn ( warning , warn ) {
45- // Suppress warnings for optional dynamic imports
46+ // Ignore unresolved import warnings for @objectstack /driver-memory
47+ // This is an optional fallback dynamic import in the runtime kernel.
48+ // It's safe to suppress because the driver is explicitly imported in src/mocks/browser.ts
4649 if (
4750 warning . code === 'UNRESOLVED_IMPORT' &&
4851 warning . message . includes ( '@objectstack/driver-memory' )
You can’t perform that action at this time.
0 commit comments