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

Don't enforce module to precede import per se #50

Merged
merged 2 commits into from
Jul 5, 2023
Merged

Commits on Jul 5, 2023

  1. Don't enforce "module" to precede "import"

    There are still valid set ups that define "module" below "import". What
    matters is that it still precedes "require", though.
    
    For example, examples 1 and 2 are fine, but example 3 is not (the
    "module" will never be used):
    
    Example 1:
    {
      ".": {
        "module": "index.mjs",  // 👍
        "import": "index.mjs",
        "require": "index.cjs",
      }
    }
    
    Example 2:
    {
      ".": {
        "import": "index.mjs",
        "module": "index.mjs",  // 👍
        "require": "index.cjs",
      }
    }
    
    Example 3:
    {
      ".": {
        "import": "index.mjs",
        "require": "index.cjs",
        "module": "index.mjs",  // ❌ Never used
      }
    }
    nvie committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    398fcb4 View commit details
    Browse the repository at this point in the history
  2. Prettier

    nvie committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    1d4811b View commit details
    Browse the repository at this point in the history