Closed luwes closed 6 years ago
I believe the problem is this line: https://github.com/rollup/rollup-plugin-node-resolve/blob/74f2e41a1f0ea6e69dada6a8d6ebc9209f058240/src/index.js#L172
@luwes, I think you can fix this (at least in recent versions of rollup-plugin-node-resolve) by setting the option preserveSymlinks
in your rollup config.
@cyungmann thank you setting preserveSymlinks
in the rollup config did it.
(not in this plugin's options but main rollup options)
I don't see any mention of preserveSymlinks
in the rollup docs. (https://rollupjs.org/guide/en#big-list-of-options). How can we get this documented?
@akonwi preserveSymlinks
is part of rollup-plugin-node-resolve
and not rollup
.
Not sure if this is an issue to be resolved here but when using
yarn link
ornpm link
the module id's resolve to the absolute path rather than the symlink path. Plugins likerollup-plugin-babel
exclude or include based on that id so when bundling local packages thisexclude: 'node_modules/**'
for example would not work with the linked packages.Related: https://github.com/rollup/rollup-plugin-babel/issues/214
The babel plugin would throw an error:
Error: An unexpected situation arose...
I fixed this by reverting to
"rollup-plugin-node-resolve": "^1.7.3",