Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preserveSymlinks: 'auto' #5427

Open
jun-sheaf opened this issue Mar 14, 2024 · 3 comments
Open

preserveSymlinks: 'auto' #5427

jun-sheaf opened this issue Mar 14, 2024 · 3 comments

Comments

@jun-sheaf
Copy link

Feature Use Case

We use a custom build system that uses symlinks for node module resolution, but not for relative module resolution.

Feature Proposal

Symlinks seem to be either always follow or never follow (corresponding to preserveSymlinks: false and preserveSymlinks: true). A more robust approach would be to try and resolve without following the symlink and then following the symlink if nothing is found.

@lukastaegert
Copy link
Member

Good idea. If we do this, we should also update @rollup/plugin-node-resolve accordingly, otherwise it will likely not work for many people. PRs welcome!

@jun-sheaf
Copy link
Author

update @rollup/plugin-node-resolve accordingly

@lukastaegert WDYT about using import-meta-resolve for the resolution algorithm rather than trying to program it ourselves?

@jun-sheaf
Copy link
Author

We've decided to just build our own resolver that better fits our requirements: https://github.com/mathematic-inc/rollup-plugin-import-meta-resolve

Please feel free to close this issue and associated PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants