Skip to content

Commit

Permalink
chore: build config modified
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-up committed Mar 2, 2024
1 parent bb00894 commit 7d1330c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { TanStackRouterVite } from '@tanstack/router-vite-plugin'

const isProduction = process.env.NODE_ENV === 'production'

const profiling = isProduction && {
'react-dom/client': 'react-dom/profiling',
}

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
Expand All @@ -12,4 +18,9 @@ export default defineConfig({
TanStackRouterVite(),
],
base: '/benchmark-performance-emotion/',
resolve: {
alias: {
...profiling,
},
},
})

0 comments on commit 7d1330c

Please sign in to comment.