-
Notifications
You must be signed in to change notification settings - Fork 5
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
Link: relative main field #96
Comments
Actually, relative paths with Your approach of linking is a very good idea. It works with I wonder if we can ask node to allow relative paths outside module root (or absolute paths) and ask webpack to implement it. |
Hello @anilanar, thank you for the issue. This is very good information to have, I was unaware of this problem with webpack. I've not used webpack with northbrook yet. I'll try to look into how to solve this issue. Any chance you have a repo I could pull to reproduce this issue? |
I will setup a basic repo, the one I'm working on is not open source (yet). |
Great, thanks. I'll take a look at this soon. |
Code to reproduce the issue:
northbrook link
Expected behavior:
Generated
package.json
files should use relative path for main field.Actual behavior:
They use absolute path.
According to https://docs.npmjs.com/files/package.json#main,
main
is a relative path. Webpack assumes the same, thus I cannot build linked packages with webpack.Edit: According to official docs from
node
, module resolution algorithm is as follows:I guess
X + (json main field)
implies that it cannot be an absolute path.The text was updated successfully, but these errors were encountered: