Skip to content

Commit 50894ae

Browse files
authored
Fix missing esm file in the build output (#7)
* fix: remove type module option from package.json, fixes #6 This option also changes the outputs of tsup. So it does not output index.mjs file but instead index.js and index.cjs files. This breaks esm imports * chore: set tsup version to ^8 to prevent future issues * chore: change tsup config for consistency with other packages
1 parent 7ed19eb commit 50894ae

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

bun.lockb

5.45 KB
Binary file not shown.

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"main": "./dist/index.js",
55
"module": "./dist/index.mjs",
66
"types": "./dist/index.d.ts",
7-
"type": "module",
87
"scripts": {
98
"test": "bun test",
109
"fmt": "prettier --write .",
@@ -45,7 +44,7 @@
4544
"eslint-plugin-unicorn": "^51.0.1",
4645
"husky": "^9.0.10",
4746
"prettier": "^3.2.5",
48-
"tsup": "latest",
47+
"tsup": "^8.2.3",
4948
"typescript": "^5.4.5",
5049
"vitest": "latest"
5150
},

tsup.config.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { defineConfig } from "tsup";
22

33
export default defineConfig({
4-
entry: ["./index.ts"],
4+
entry: ["index.ts"],
55
format: ["cjs", "esm"],
6-
sourcemap: false,
76
clean: true,
87
dts: true,
9-
minify: true,
108
});

0 commit comments

Comments
 (0)