Skip to content
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

update main prop, sync to the current behaviour #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

update main prop, sync to the current behaviour #61

wants to merge 1 commit into from

Conversation

timaschew
Copy link
Member

No description provided.

This file will be returned when you require its component and autorequired by the build process.
It is recommended that you use "index.js" for the main component file.
If you omit the "main" field, the first file in the "scripts" array will be used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically, it's the first file in the first .use()ed field you use, which by default is "scripts". however, that's implementation and this is specifications. specs only have to say that you should and that it defaults to index.js, implementation can do whatever it wants :P

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, what's about a note, that the behavior when requiring is different to node.js:
you only can require the main file, if you want to expose other files, the main file should "proxy" them.
in node.js you can require any file of a module by adding a relative path to the module name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants