Files
react-test/examples/material-ui-react-router-ts/vite.config.ts
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

17 lines
644 B
TypeScript

import { reactRouter } from '@react-router/dev/vite';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
plugins: [reactRouter(), tsconfigPaths()],
ssr: {
// Workaround for resolving dependencies in the server bundle
// Without this, the React context will be different between direct import and transitive imports in development environment
// For more information, see https://github.com/mui/material-ui/issues/45878#issuecomment-2987441663
optimizeDeps: {
include: ['@emotion/*', '@mui/*'],
},
noExternal: ['@emotion/*', '@mui/*'],
},
});