Skip to content

Commit

Permalink
fix: fix esm error in bin
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 17, 2023
1 parent 181f42c commit 247dff8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require("../dist/bin.js");
import("../dist/bin.js");
1 change: 0 additions & 1 deletion bin/index.mjs

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
},
"license": "MIT",
"author": "Edie Lemoine <edie.lemoine@gmail.com>",
"type": "module",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
"import": "./dist/index.js"
}
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"bin": "./dist/bin.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/bin.ts", "src/index.ts"],
format: ["cjs", "esm"],
format: ["esm"],
tsconfig: "tsconfig.build.json",
});

0 comments on commit 247dff8

Please sign in to comment.