Skip to content

Commit

Permalink
compile to cjs and esm
Browse files Browse the repository at this point in the history
  • Loading branch information
mgpai22 committed Feb 2, 2024
1 parent bdfb453 commit 8ba64f0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"version": "0.0.1-alpha",
"license": "GPL-3.0-only",
"main": "dist/index.js",
"main": "dist/winter-cardano.cjs.production.min.js",
"module": "dist/winter-cardano.esm.js",
"typings": "dist/index.d.ts",
"files": [
"dist",
Expand All @@ -28,7 +29,6 @@
},
"name": "winter-cardano",
"description": "TypeScript implementation of the WINTER traceability protocol for Cardano blockchain.",
"module": "dist/winter-cardano.esm.js",
"size-limit": [
{
"path": "dist/winter-cardano.cjs.production.min.js",
Expand Down
9 changes: 9 additions & 0 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"outDir": "./dist/cjs",
"declaration": true
},
"exclude": ["node_modules", "dist", "test"]
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
// "incremental": true,
"rootDir": "./src",
"strictPropertyInitialization": false,
"target": "ESNext",
"moduleResolution": "Node",
Expand All @@ -26,5 +27,5 @@
}
},
"compileOnSave": false,
"exclude": ["**/node_modules", "**/dist"]
"exclude": ["**/node_modules", "**/dist", "test"]
}

0 comments on commit 8ba64f0

Please sign in to comment.