Skip to content

Commit

Permalink
fix(markdown): export cjs bundle
Browse files Browse the repository at this point in the history
Export cjs bundle in addition to the esm bundle
  • Loading branch information
sdorra committed Sep 27, 2024
1 parent 6b1c17a commit 9cbd057
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/silly-weeks-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@content-collections/markdown": patch
---

Export cjs bundle besides the esm bundle
8 changes: 5 additions & 3 deletions packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
"description": "Compile markdown to html as part of your content-collection transform function",
"version": "0.1.1",
"type": "module",
"main": "dist/index.js",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"require": "./dist/index.cjs"
}
},
"scripts": {
"build": "tsup src/index.ts --format esm --dts -d dist",
"build": "tsup src/index.ts --format esm,cjs --dts -d dist",
"test": "vitest --run --coverage",
"typecheck": "tsc"
},
Expand Down

0 comments on commit 9cbd057

Please sign in to comment.