diff --git a/.changeset/real-cars-greet.md b/.changeset/real-cars-greet.md new file mode 100644 index 0000000..e24fb32 --- /dev/null +++ b/.changeset/real-cars-greet.md @@ -0,0 +1,5 @@ +--- +"bright": major +--- + +Remove CJS support. [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). diff --git a/lib/package.json b/lib/package.json index 4029a0b..4de5792 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,8 +1,9 @@ { "name": "bright", "version": "0.8.6", + "type": "module", + "module": "./dist/index.js", "main": "./dist/index.js", - "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "repository": "https://github.com/code-hike/bright", "homepage": "https://bright.codehike.org", @@ -12,11 +13,11 @@ "dist/**" ], "scripts": { - "build": "tsup src/index.tsx --format esm,cjs --dts", - "watch": "tsup src/index.tsx --format esm,cjs --watch --dts" + "build": "tsup src/index.tsx --format esm --dts", + "watch": "tsup src/index.tsx --format esm --watch --dts" }, "dependencies": { - "@code-hike/lighter": "^1.0.0", + "@code-hike/lighter": "^1.0.2", "server-only": "^0.0.1" }, "devDependencies": { diff --git a/web/app/test/page.tsx b/web/app/test/page.tsx index 51ae039..a517d3a 100644 --- a/web/app/test/page.tsx +++ b/web/app/test/page.tsx @@ -33,4 +33,4 @@ export default function Page() { ) } -export const runtime = "edge" +// export const runtime = "edge"