import { defineConfig } from 'vite' import react, { reactCompilerPreset } from '@vitejs/plugin-react' import babel from '@rolldown/plugin-babel' import rollupReplace from '@rollup/plugin-replace' // https://vitejs.dev/config/ export default defineConfig({ server: { port: 7777, allowedHosts: true, }, plugins: [ rollupReplace({ preventAssignment: true, values: { __DEV__: JSON.stringify(true), 'process.env.NODE_ENV': JSON.stringify('development'), }, }), react(), // React Compiler - comment out the next line to disable babel({ presets: [reactCompilerPreset()], include: [/\/src\/.*\.[jt]sx?$/], }), ], })