-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
cd(node): ban package.json
main entry
#9068
Conversation
Build Stats
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ready
This is acceptable since we have now 2 entry points, and definetely we want to have people using the correct entry points |
I wanted to test that but I am pretty sure using dynamic import will always work |
What do you mean dynamic import? i want to merge this but i need to be sure i understand what is changing, and with this description i m not sure i get it |
I also got a bug yesterday with webglprobe and i m trying to understand if it is because of this. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: add import/require tests in node
Checking the npm docs, the exports and the module property we use do not exists. main and browser are the only 2 supported entries? |
can you point out the docs |
And also we should check in MDN how browser modules work |
Here is the npm doc page i was referring to: it has main and browser but doesn't mention the others. The other one we use for sub-folders style imports i found them here: And today searching again i also found this one: |
i would like to find an example/explanations for main equal null to understand which use cases is solving |
The node documentation clearly says that exports is an alternative to main. Also found this PR to the proposal that fix the description because of a bug with the absence of a main entry when using "." export entrypoint. https://github.com/jkrems/proposal-pkg-exports/pull/38/files We do use "." instead of "./" and eventually we can change that, but it doesn't seem that is causing an error to us |
df81f5e
to
9a0d062
Compare
@ShaMan123 my question is still open, why main needs to be null and not removed from the package.json ? |
I don't rememeber |
Description
Blocks the main (legacy) entry by setting it to null
This will remove all ambiguous resolution and force the dev to use
fabric/node
related to #9045
Changes
Gist
In Action