-
Notifications
You must be signed in to change notification settings - Fork 85
Symlink resolution #100
Comments
Perhaps related to #98. Can you provide a repro? |
I solved my problem by setting This works with the following plugins:
|
Now that resolve({ mainFields: ['module'] }) |
This no longer repros. Probably fixed by some of the recent symlinking improvements across this plugin, rollup-plugin-commonjs, and browserify/resolve. Please re-open if this is still an issue! |
@bterlson Hello. 👋 I just updated my rollup packages and commented out the workaround and the issue still seems to be present for me. What this screenshot is showing is that the files I'm importing from symlinked folders are not being found. I'm not sure if it matters, but the symlink that I'm using in my project is a relative softlink. In my project I have a root level folder called
EDIT: Also, fwiw, this was working in version 2.0.0 and prior. |
I created an updated repro in this repository.
|
This line is wrong: https://github.com/rollup/rollup-plugin-node-resolve/blob/master/src/index.js#L74
/project/packageA/index.js
/project/packageA/node_modules/async
/project/packageA/node_modules/packageB as symlink
/project/packageB/index.js
packageA includes packageB and packageB includes async. But async lives under packageA as per how npm installs packages (cf. https://docs.npmjs.com/cli/dedupe).
Now, because of the L74, packageB gets resolved to /project/packageB and rollup tries to import async from packageB/node_modules/async, which does not exist.
The text was updated successfully, but these errors were encountered: