headplane/vite.config.ts

28 lines
611 B
TypeScript
Raw Normal View History

2024-03-25 17:50:58 -04:00
import { vitePlugin as remix } from '@remix-run/dev'
import { installGlobals } from '@remix-run/node'
import { defineConfig } from 'vite'
import babel from 'vite-plugin-babel'
2024-03-25 17:50:58 -04:00
import tsconfigPaths from 'vite-tsconfig-paths'
2024-03-25 17:50:58 -04:00
installGlobals()
export default defineConfig(({ isSsrBuild }) => ({
2024-03-26 10:07:04 -04:00
base: '/admin/',
build: isSsrBuild ? { target: 'ES2022' } : {},
plugins: [
remix({
basename: '/admin/',
}),
tsconfigPaths(),
babel({
filter: /\.[jt]sx?$/,
babelConfig: {
2024-05-30 10:20:53 -04:00
presets: ['@babel/preset-typescript'],
plugins: [
2024-05-30 10:20:53 -04:00
['babel-plugin-react-compiler', {}],
],
},
}),
],
}))