Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreardon committed May 24, 2024
1 parent 684c6fc commit 9116dc1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@
},
"sideEffects": false,
"type": "module",
"types": "./dist/index.d.ts",
"exports": "./dist/index.js",
"exports": {
"import": {
".": "./dist/esm/index.js"
},
"require": {
".": "./dist/cjs/index.cjs"
},
"types": "./dist/esm/index.d.ts"
},
"config": {
"prettier_target": "src/**/*.ts test/**/*.ts"
},
Expand All @@ -44,7 +51,7 @@
"scripts": {
"build": "yarn build:clean && yarn build:dist",
"build:clean": "rimraf dist",
"build:dist": "tsc",
"build:dist": "tsc && tsc --project tsconfig.cjs.json",
"check": "yarn check:typescript && yarn check:prettier",
"check:prettier": "prettier --debug-check $npm_package_config_prettier_target",
"check:typescript": "tsc --noEmit && tsc --noEmit --project ./test/tsconfig.json",
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"verbatimModuleSyntax": false,
"module": "CommonJS",
"outDir": "dist/cjs",
},
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"noImplicitOverride": true,
/* If transpiling with TypeScript: */
"module": "es2022",
"outDir": "dist",
"outDir": "dist/esm",
/* AND if you're building for a library: */
"declaration": true,
/* If your code runs in the DOM: */
Expand Down

0 comments on commit 9116dc1

Please sign in to comment.