Skip to content

Commit 5134326

Browse files
committed
enable profiler for production
1 parent b056e3e commit 5134326

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

electron-react/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
66
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8-
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' blob:" />
8+
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:">
99
<title>Athena</title>
1010
</head>
1111
<body>

electron-react/vite.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ export default defineConfig(({ command }) => {
1616
return {
1717
resolve: {
1818
alias: {
19-
'@': path.join(__dirname, 'src')
19+
'@': path.join(__dirname, 'src'),
20+
'react-dom/client': path.resolve(
21+
__dirname,
22+
'node_modules/react-dom/profiling.js'
23+
),
24+
'scheduler/tracing': path.resolve(
25+
__dirname,
26+
'node_modules/scheduler/tracing-profiling'
27+
),
2028
},
2129
},
2230
plugins: [

electron-react/vite.legacy.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ export default defineConfig(({ command }) => {
1919
return {
2020
resolve: {
2121
alias: {
22-
'@': path.join(__dirname, 'src')
22+
'@': path.join(__dirname, 'src'),
23+
'react-dom/client': path.resolve(
24+
__dirname,
25+
'node_modules/react-dom/profiling.js'
26+
),
27+
'scheduler/tracing': path.resolve(
28+
__dirname,
29+
'node_modules/scheduler/tracing-profiling'
30+
),
2331
},
2432
},
2533
plugins: [

0 commit comments

Comments
 (0)