-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathindex.tsx
More file actions
41 lines (35 loc) · 1.1 KB
/
Copy pathindex.tsx
File metadata and controls
41 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* BookPublisher MD2Docx
* Copyright (c) 2025 EricHuang
* Licensed under the MIT License.
* See LICENSE file in the project root for full license information.
*/
import React from 'react';
import { createRoot } from 'react-dom/client';
import { Buffer } from 'buffer';
import App from './App';
import '@fontsource/geist/400.css';
import '@fontsource/geist/500.css';
import '@fontsource/geist/600.css';
import '@fontsource/geist/700.css';
import '@fontsource/geist/900.css';
import '@fontsource/geist-mono/400.css';
import '@fontsource/geist-mono/600.css';
import './globals.css';
import './services/i18n'; // Initialize i18n
const browserGlobal = globalThis as unknown as {
Buffer?: typeof Buffer;
process?: { env: Record<string, string | undefined> };
};
browserGlobal.Buffer = browserGlobal.Buffer || Buffer;
browserGlobal.process = browserGlobal.process || { env: {} };
const container = document.getElementById('root');
if (!container) {
throw new Error("Could not find root element to mount to");
}
const root = createRoot(container);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);