Skip to content

esdx@0.1.0

Compare
Choose a tag to compare
@github-actions github-actions released this 23 Jun 13:31
· 216 commits to main since this release
7452b5b

This release contains backwards-incompatible changes. Since esdx is before version 1.0.0, these changes have been released as a new minor version to reflect this (as recommended by npm). You should either be pinning the exact version of esdx in your package.json file or be using a version range syntax that only accepts patch upgrades such as ~0.11.0. See the documentation about semver for more information.

Minor Changes

  • 888ce4c: Add esdx config support in package.json

    This allows esdx to be more flexible and allows the following supporting the following usecases:

    • multiple entries
    {
      "main": "dist/index.js",
      "types": "dist/index.d.ts",
      "type": "module",
      "exports": {
        ".": "dist/index.js",
        "./another": "dist/another.js"
      },
      "esdx": {
        "entries": [
          {
            "source": "src/index.tsx",
            "format": "esm",
            "output": "dist/index.js",
            "types": "dist/index.d.ts"
          },
          {
            "source": "src/another.tsx",
            "format": "esm",
            "output": "dist/another.js",
            "types": "dist/another.d.ts"
          }
        ]
      }
    }
    • multiple formats
    {
      "main": "dist/index.cjs.js",
      "module": "dist/index.esm.js",
      "types": "dist/index.d.ts",
      "esdx": {
        "entries": [
          {
            "source": "src/index.tsx",
            "format": "esm",
            "output": "dist/index.esm.js",
            "types": "dist/index.d.ts"
          },
          {
            "source": "src/index.tsx",
            "format": "cjs",
            "output": "dist/index.cjs.js"
          }
        ]
      }
    }

Migration guide

  1. remove source attribute from package.json
  2. add the following code to package.json if you want the previous behavior, or you can use one of the examples above to support multiple formats or entries.
{
      "main": "dist/index.js",
      "type": "module",
      "types": "dist/index.d.ts",
      "esdx": {
        "entries": [
          {
            "source": "src/index.tsx",
            "format": "esm",
            "output": "dist/index.js",
            "types": "dist/index.d.ts"
          }
        ]
      }