Skip to content

main should support skipping the .js suffix #2

Closed

Description

@rauchg

Right now if a user specifies main in package.json, we expect it to have a .js suffix, but npm supports without.

Activity

  1. added and removed on Sep 10, 2016
  2. codyzu commented on Oct 19, 2016

    @codyzu
    Contributor

    @rauchg I have been looking into this issue.

    Can you clarify the expected vs actual behavior?

    According the the npm docs, main is only used to define the default import when a consumer requires (or imports) an npm module. This is also described in the node.js module docs.

    Can you describe clarify the issue because it is not clear to me how this relates to now?

    Thanks! and thanks for now, hyper, and everything zeit!!!

  3. leo commented on Dec 3, 2016

    @leo
    Contributor
  4. TooTallNate commented on Dec 3, 2016

    @TooTallNate
    Member

    Is this related to file upload whitelisting, and forcing the main file to be included in that whitelist?

  5. leo commented on Dec 4, 2016

    @leo
    Contributor

    @TooTallNate Two things:

    1. Are we throwing an error if .js is missing, maybe?
    2. Are we using the property to run node <main-file>, maybe (which then only works with the extension, not without it)?

    I don't think it's about file upload whitelisting... 🤔

  6. added a commit that references this issue on Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions