-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Better handling of package.json main configuration #190
Labels
Milestone
Comments
We already support index.js as "last resort" |
now in package.json in attribute "main", it doesn't matter if you didn't specify the ".js" extension, because it will be added if missing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moved from NativeScript/nativescript-cli#670
@jlooper and I have run across a few different npm modules that have a
"main"
of"index"
in theirpackage.json
, instead of"index.js"
—for example https://github.com/Sembiance/email-validator and https://github.com/snoj/email-validation.This difference means that using one of these modules requires you to do:
instead of
Can the NativeScript CLI be changed to assume the .js suffix when it is not present? Furthermore, I'd like the CLI to support modules that do not have a
"main"
in theirpackage.json
at all. In these cases the NativeScript CLI should just use that module'sindex.js
(if present).Thanks.
The text was updated successfully, but these errors were encountered: