Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

chore: improve build #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rtritto
Copy link

@rtritto rtritto commented Sep 28, 2024

Changes

  • replace rimraf with tsup
  • fix ESM import/export with correct extension (.mjs instead of .js):
    • related warning:
      (node:29464) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use `node --trace-warnings ...` to show where the warning was created)
    • related import error:
      SyntaxError: Cannot use import statement outside a module
    • diff of exports in package.json:
      - "require": "./dist/cjs/index.js",
      - "import": "./dist/index.js",
      - "node": "./dist/index.js",
      - "default": "./dist/index.js"
      + "types": "./dist/index.d.ts",
      + "import": "./dist/index.mjs",
      + "require": "./dist/cjs/index.js"

Sources:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant