Skip to content

Commit

Permalink
enable profiler for production
Browse files Browse the repository at this point in the history
  • Loading branch information
Chang254 committed Apr 13, 2023
1 parent b056e3e commit 5134326
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion electron-react/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' blob:" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:">
<title>Athena</title>
</head>
<body>
Expand Down
10 changes: 9 additions & 1 deletion electron-react/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ export default defineConfig(({ command }) => {
return {
resolve: {
alias: {
'@': path.join(__dirname, 'src')
'@': path.join(__dirname, 'src'),
'react-dom/client': path.resolve(
__dirname,
'node_modules/react-dom/profiling.js'
),
'scheduler/tracing': path.resolve(
__dirname,
'node_modules/scheduler/tracing-profiling'
),
},
},
plugins: [
Expand Down
10 changes: 9 additions & 1 deletion electron-react/vite.legacy.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ export default defineConfig(({ command }) => {
return {
resolve: {
alias: {
'@': path.join(__dirname, 'src')
'@': path.join(__dirname, 'src'),
'react-dom/client': path.resolve(
__dirname,
'node_modules/react-dom/profiling.js'
),
'scheduler/tracing': path.resolve(
__dirname,
'node_modules/scheduler/tracing-profiling'
),
},
},
plugins: [
Expand Down

0 comments on commit 5134326

Please sign in to comment.