Replies: 5 comments
-
This is due to https://github.com/remix-run/remix/blob/main/packages/remix-dev/config/routesConvention.ts#L214 using function visitFiles(
dir: string,
visitor: (file: string) => void,
baseDir = dir
): void {
for (let filename of fs.readdirSync(dir)) {
let file = path.resolve(dir, filename);
let stat = fs.lstatSync(file);
if (stat.isDirectory()) {
visitFiles(file, visitor, baseDir);
} else if (stat.isFile()) {
visitor(path.relative(baseDir, file));
}
}
}
This is an easy enough PR (I did a separate PR on |
Beta Was this translation helpful? Give feedback.
-
Nice. One of my first attempts to sharing route files was to use symlinks. Thanks for figuring out why Remix wasn't following links. |
Beta Was this translation helpful? Give feedback.
-
Converting this to a Proposal discussion, as per our Development Process. |
Beta Was this translation helpful? Give feedback.
-
Any update on this? Or is there an alternative way to share routes? |
Beta Was this translation helpful? Give feedback.
-
This also breaks bazel based builds which symlinks source files. |
Beta Was this translation helpful? Give feedback.
-
What version of Remix are you using?
1.7.5
Steps to Reproduce
Initialize the project.
Make
routes/index.tsx
symlink.Show detected routes
Expected Behavior
The routes that is symlink is detected
Actual Behavior
routes/index.tsx
is not detected as routes even though it exists.Beta Was this translation helpful? Give feedback.
All reactions