mirror of
https://github.com/davidkaya/aryx.git
synced 2026-11-29 03:52:39 +01:00
Remove the prismSetup module that imported prismjs directly — it caused Vite to pre-bundle prismjs into a separate chunk from @lexical/code-prism, breaking the CJS require chain. Language components tried to call Prism.languages.extend() before the base grammars were available, crashing the app. Instead, add optimizeDeps.include for prismjs and @lexical/code-prism so Vite pre-bundles them together, preserving the correct CJS evaluation order within a single chunk. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
17 lines
353 B
TypeScript
17 lines
353 B
TypeScript
import { StrictMode } from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
|
|
import App from '@renderer/App';
|
|
import '@renderer/styles.css';
|
|
|
|
const container = document.getElementById('root');
|
|
if (!container) {
|
|
throw new Error('Could not find the root element.');
|
|
}
|
|
|
|
createRoot(container).render(
|
|
<StrictMode>
|
|
<App />
|
|
</StrictMode>,
|
|
);
|