Skip to content

Commit

Permalink
fix(esm build): add type and main to mix package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
carpasse committed Feb 28, 2024
1 parent f617620 commit 59631fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"test:coverage": "node --import tsx --no-warnings --test --experimental-test-coverage ./src/**/*.test.ts",
"build": "npm-run-all clean build:*",
"clean": "rimraf dist",
"build:cjs": "tsc -p ./tsconfig.cjs.json && cat >dist/cjs/package.json <<!EOF\n{\n \"type\": \"commonjs\"\n}\n!EOF",
"build:esm": "tsc --project tsconfig.esm.json && cat >dist/esm/package.json <<!EOF\n{\n \"type\": \"module\"\n}\n!EOF",
"build:cjs": "tsc -p ./tsconfig.cjs.json && cat >dist/cjs/package.json <<!EOF\n{\n\"type\":\"commonjs\",\n\"types\":\"./index.d.ts\",\n\"main\":\"./index.js\"\n}\n!EOF",
"build:esm": "tsc -p ./tsconfig.esm.json && cat >dist/esm/package.json <<!EOF\n{\n\"type\":\"module\",\n\"types\":\"./index.d.ts\",\n\"main\":\"./index.js\"\n}\n!EOF",
"lint": "eslint './**/*.{js,jsx,ts,tsx}' && npm run typecheck",
"lint:fix": "eslint './**/*.{js,jsx,ts,tsx}' --fix",
"lint:ci": "eslint './**/*.{js,jsx,ts,tsx}' --fix",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"declaration": true,
"declarationDir": "./dist/esm",
"outDir": "./dist/esm",
"module": "esnext"
"module": "esnext",
"target": "ESNext"
}
}

0 comments on commit 59631fb

Please sign in to comment.