Skip to content

Commit

Permalink
Fix(Cross Import): ESM build script and update package.json exports
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Feb 16, 2024
1 parent 4dc77e0 commit 72ebc89
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 11 deletions.
12 changes: 11 additions & 1 deletion packages/cross-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "cross-import",
"scripts": {
"build:cjs": "esbuild src/index.ts --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node",
"build:esm": "esbuild src/index.ts --outfile=dist/index.mjs --format=esm --minify --sourcemap --platform=node",
"build:type": "tsc --emitDeclarationOnly --preserveWatchOutput",
"build": "pnpm run \"/^build:.*/\"",
"dev": "pnpm run \"/^build:.*/\" --watch",
Expand Down Expand Up @@ -43,8 +44,17 @@
"access": "public"
},
"main": "./dist/index.js",
"jsnext:main": "./dist/index.mjs",
"esnext": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": "./dist/index.js",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist"
],
Expand Down
35 changes: 25 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 72ebc89

Please sign in to comment.