We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2c6ea1 commit 28803f0Copy full SHA for 28803f0
packages/ts/file-router/src/vite-plugin.ts
@@ -115,7 +115,8 @@ export default function vitePluginFileSystemRouter({
115
},
116
transform(code, id): Promise<TransformResult> | TransformResult {
117
let modifiedCode = code;
118
- if (id.startsWith(fileURLToPath(_viewsDir)) && !basename(id).startsWith('_')) {
+ const viewsDirUsingSlashes = fileURLToPath(_viewsDir).replaceAll('\\', '/');
119
+ if (id.startsWith(viewsDirUsingSlashes) && !basename(id).startsWith('_')) {
120
if (isDevMode) {
121
// To enable HMR for route files with exported configurations, we need
122
// to address a limitation in `react-refresh`. This library requires
0 commit comments