Skip to content

Commit

Permalink
[Project] Improve dual publishing and treeshaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Pewtro committed Jul 1, 2024
1 parent a1962a5 commit e45ef2a
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .changeset/moody-goats-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@blizzard-api/classic-wow': patch
'@blizzard-api/client': patch
'@blizzard-api/core': patch
'@blizzard-api/wow': patch
'@blizzard-api/d3': patch
---

Improve dual publishing of cjs and esm, as well as improve treeshaking through tsup
4 changes: 3 additions & 1 deletion packages/classic-wow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"engines": {
"node": "^18.18 || ^20.9 || ^21.1 || ^22"
},
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"import": {
"types": "./dist/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"engines": {
"node": "^18.18 || ^20.9 || ^21.1 || ^22"
},
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"import": {
"types": "./dist/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"engines": {
"node": "^18.18 || ^20.9 || ^21.1 || ^22"
},
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"import": {
"types": "./dist/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion packages/d3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"engines": {
"node": "^18.18 || ^20.9 || ^21.1 || ^22"
},
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"import": {
"types": "./dist/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion packages/wow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"engines": {
"node": "^18.18 || ^20.9 || ^21.1 || ^22"
},
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"import": {
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"noFallthroughCasesInSwitch": true,

/* Default library settings */
"lib": ["ES2022"],
"lib": ["ESNext"],

/* Vite specific settings */
"types": ["vitest/importMeta"],
Expand Down
1 change: 1 addition & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export default defineConfig(({ watch = false }) => ({
format: ['cjs', 'esm'],
outDir: 'dist',
sourcemap: true,
treeshake: true,
watch,
}));

0 comments on commit e45ef2a

Please sign in to comment.