Skip to content

v1.0.1

Choose a tag to compare

@lukeed lukeed released this 11 Jan 19:10
· 62 commits to master since this release

Patches

  • Add support for conditionals within directory mappings – both subpath and subpattern variants (#1, #2): a881ef8
    The following examples are now supported, in congruence with the Node.js algorithm (v12.20+):

    {
      "name": "foobar",
      "exports": {
        // subpath folder mapping
        "./features/": {
          "browser": {
            "import": "./browser.import/",
            "require": "./browser.require/"
          },
          "import": "./import/",
          "require": "./require/"
        },
        // subpath pattern mapping
        "./features/*": {
          "browser": {
            "import": "./browser.import/*.mjs",
            "require": "./browser.require/*.js"
          },
          "import": "./import/*.mjs",
          "require": "./require/*.js"
        }
      }
    }