Skip to content

Commit

Permalink
🔧 Update build config
Browse files Browse the repository at this point in the history
  • Loading branch information
cermakjiri committed Apr 16, 2024
1 parent da2de90 commit 99113bc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ dist

.cache

cjs
cjs
esm
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode
src
tests
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
},
"type": "module",
"main": "cjs/index.js",
"module": "dist/index.js",
"module": "esm/index.js",
"exports": {
".": "./dist/index.js",
".": "./esm/index.js",
"./cjs": "./cjs/index.js"
},
"devDependencies": {
Expand All @@ -34,7 +34,7 @@
"scripts": {
"format": "prettier --write ./**/*.{ts,js,json,yml,md} --ignore-path .gitignore --log-level=warn --cache --cache-strategy=content --cache-location=.cache/prettier --no-editorconfig",
"lint": "eslint --cache --cache-strategy=content --cache-location .cache/eslint",
"build:es": "rm -rf dist && tsc --project tsconfig.json",
"build:es": "rm -rf esm && tsc --project tsconfig.json",
"build:cjs": "rm -rf cjs && tsc --project tsconfig.cjs.json || exit 0",
"build": "yarn build:es && yarn build:cjs",
"test:build": "vite build --config ./tests/vite.config.ts",
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"node"
],
"baseUrl": "./src",
"outDir": "./dist",
"outDir": "./esm",
"sourceMap": true,
"declaration": true
},
Expand All @@ -30,6 +30,7 @@
"node_modules",
".yarn",
"build",
"dist"
"esm",
"cjs"
]
}

0 comments on commit 99113bc

Please sign in to comment.