Skip to content

Commit

Permalink
fix: drop usage of module field and mark packages as module
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Sep 21, 2023
1 parent f7bcd98 commit 4a5d22f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/swift-icons-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"twyx": patch
---

Adjust `package.json` and subfolder JSONs to reflect default ESM status.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"type": "git",
"url": "https://github.com/probablyup/twyx"
},
"module": ".generated/core.js",
"type": "module",
"main": ".generated/core.js",
"types": ".generated/core.d.ts",
"files": [
".generated",
Expand Down Expand Up @@ -49,9 +50,10 @@
"check:unit": "bun test",
"check:size": "bundlemon",
"precompile": "rm -rf .generated",
"compile": "bun compile:colors && bun compile:lib && bun compile:types && bun check:size",
"compile": "bun compile:colors && bun compile:lib && bun compile:transformer && bun compile:types && bun check:size",
"compile:colors": "bun scripts/generate-colors.ts",
"compile:lib": "bun build ./core.ts ./react/index.tsx ./transformer/index.ts --external=* --outdir=.generated --sourcemap=external --minify",
"compile:lib": "bun build ./core.ts ./react/index.tsx --external=* --outdir=.generated --sourcemap=external --minify",
"compile:transformer": "bun build ./transformer/index.ts --outdir=.generated/transformer --sourcemap=external --minify",
"postcompile:lib": "bun check:size",
"compile:demo:css": "tailwindcss -c tailwind.config.ts -i demo/style.css -o demo/public/style.generated.css --minify",
"compile:types": "tsc -p tsconfig.build.json",
Expand Down
3 changes: 2 additions & 1 deletion react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "twyx/react",
"private": true,
"module": "../.generated/react/index.js",
"type": "module",
"main": "../.generated/react/index.js",
"types": "../.generated/react/index.d.ts"
}
3 changes: 2 additions & 1 deletion transformer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "twyx/transformer",
"private": true,
"module": "../.generated/transformer/index.js",
"type": "module",
"main": "../.generated/transformer/index.js",
"types": "../.generated/transformer/index.d.ts"
}

0 comments on commit 4a5d22f

Please sign in to comment.