The build process fails on Windows due to path separator differences. The current code uses string replacement with hardcoded forward
slashes, but Windows uses backslashes.
Error:
Error: ENOENT: no such file or directory, open 'data..\data..\filename.mdx'
Solution:
Replace string manipulation with path.basename() which is cross-platform.
Environment:
- OS: Windows
- Node.js: v20.17.0
- pnpm: 10.2.0