-
Notifications
You must be signed in to change notification settings - Fork 126
Doesn't include files in package installed from filesystem. #402
Comments
@david476 can you upload a repro to a git repo (with the node_modules folder included so npm install is not needed)? |
I just realized that npm symlinks the folder, that's probably why; this may not actually qualify as a bug then. Anyway, here's a minimal example, just run |
Also, for future reference if people run into this, you can install your package from the filesystem using |
@david476 thanks so much for the repro. I think there is a real bug under the covers, though probably not on this project. @lukastaegert any thoughts here? The issue is ultimately we're trying to filter realpaths (./library/index.js) against symlinked paths (./package/node_modules/library/index.js). This points to two fixes on your end, @david476:
However, something seems amiss here - I'm not sure why rollup-plugin-node-resolve is realpathing itself here - shouldn't we just blindly use whatever |
I have been working toward a goal of supporting include/exclude paths like
Neither solution seems palatable. I believe this is because we're comparing paths procured from One possible improvement is to leave include/exclude as-is (but better documented) and also support an includeModules/excludeModules form that is a list of module names that are resolved using Closing this issue now, but feel free to re-open if someone can think of how to make a glob like |
This addresses the confusion reported in #402 IMO it would be nice to make this easier on people by supporting includeModule/excludeModule, but in the meantime we should document symlinks a bit better.
* Update README.md with note on symlinks This addresses the confusion reported in #402 IMO it would be nice to make this easier on people by supporting includeModule/excludeModule, but in the meantime we should document symlinks a bit better. * Couple cleanups * Apply suggestions from code review Co-Authored-By: Andrew Powell <[email protected]> * Update namedExports docs Prefer specifying module names over paths
With
include
set to['node_modules/**']
, it doesn't seem to process packages installed from the local filesystem (e.g.npm i ~/foo/bar
). Given that installing packages that way copies them intonode_modules
, I believe this is a bug.The text was updated successfully, but these errors were encountered: