Skip to content

Commit 862cdab

Browse files
committed
wip
1 parent 05a139d commit 862cdab

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

integration/vite-hmr-hdr-test.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -49,33 +49,33 @@ const indexRoute = tsx`
4949

5050
templates.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
});

0 commit comments

Comments
 (0)