File tree Expand file tree Collapse file tree 1 file changed +22
-22
lines changed
Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -49,33 +49,33 @@ const indexRoute = tsx`
4949
5050templates . forEach ( ( template ) => {
5151 const isRsc = template . name . includes ( "rsc" ) ;
52- const viteConfigContent = tsx `
53- ${
54- ! isRsc
55- ? " import { reactRouter } from '@react-router/dev/vite';"
56- : [
57- "import { unstable_reactRouterRSC as reactRouterRSC } from '@react-router/dev/vite';" ,
58- "import rsc from '@vitejs/plugin-rsc';" ,
59- ] . join ( "\n" )
60- }
61- import { envOnlyMacros } from "vite-env-only";
62- import tsconfigPaths from "vite-tsconfig-paths" ;
63-
64- export default async () => ({
65- plugins: [
66- ${ isRsc ? "reactRouterRSC()," : "reactRouter()," }
67- ${ isRsc ? "rsc()," : "" }
68- envOnlyMacros(),
69- tsconfigPaths()
70- ],
71- }) ;
72- ` ;
52+ const viteConfig = isRsc
53+ ? tsx `
54+ import { unstable_reactRouterRSC as reactRouterRSC } from '@react-router/dev/vite';
55+ import rsc from '@vitejs/plugin-rsc';
56+
57+ export default {
58+ plugins: [
59+ reactRouterRSC(),
60+ rsc(),
61+ ],
62+ } ;
63+ `
64+ : tsx `
65+ import { reactRouter } from '@react-router/dev/vite';
66+
67+ export default {
68+ plugins: [
69+ reactRouter(),
70+ ],
71+ } ;
72+ ` ;
7373
7474 test . describe ( `${ template . displayName } - HMR & HDR` , ( ) => {
7575 test . use ( {
7676 template : template . name ,
7777 files : {
78- "vite.config.ts" : viteConfigContent ,
78+ "vite.config.ts" : viteConfig ,
7979 "app/routes/_index.tsx" : indexRoute ,
8080 } ,
8181 } ) ;
You can’t perform that action at this time.
0 commit comments