Skip to content

Commit

Permalink
chore(npm): Make it commonjs by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ribose-jeffreylau committed Aug 17, 2023
1 parent a10fc68 commit ba2ef5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"typecheck": "tsc -p tsconfig.build.json --noEmit --pretty",
"build:decl": "tsc -p tsconfig.types.json",
"build": "concurrently pnpm:build:cjs pnpm:build:mjs",
"build:mjs": "swc ${npm_package_src_dir} --sync --config module.type=es6 --out-dir ${npm_package_dist_dir}/mjs --copy-files --extensions '.ts,.tsx,.js,.jsx,.json'",
"build:mjs": "swc ${npm_package_src_dir} --sync --config module.type=es6 --out-dir ${npm_package_dist_dir}/mjs --copy-files --extensions '.ts,.tsx,.js,.jsx,.json' && pnpm run postbuild:mjs",
"build:cjs": "swc ${npm_package_src_dir} --sync --config module.type=commonjs --out-dir ${npm_package_dist_dir}/cjs --copy-files --extensions '.ts,.tsx,.js,.jsx,.json'",
"postbuild:mjs": "echo '{\"type\": \"module\"}'> ${npm_package_dist_dir}/mjs/package.json",
"tsc": "tsc -p tsconfig.build.json && cp package.json ${npm_package_dist_dir}/",
"dist": "concurrently pnpm:build pnpm:build:decl",
"build-typecheck": "concurrently pnpm:build pnpm:typecheck",
Expand All @@ -39,7 +40,6 @@
],
"main": "main.js",
"types": "main.d.ts",
"type": "module",
"typesVersions": {
"*": {
"*": [
Expand Down

0 comments on commit ba2ef5d

Please sign in to comment.