Skip to content

Commit

Permalink
Merge pull request #846 from tszhong0411/pack-6-tree-shakable-packages
Browse files Browse the repository at this point in the history
Tree shakable packages
  • Loading branch information
tszhong0411 authored Aug 20, 2024
2 parents 53f9b2c + d0eab68 commit ab40895
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-planes-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tszhong0411/utils': patch
---

tree-shakable
5 changes: 5 additions & 0 deletions .changeset/fast-spiders-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tszhong0411/ui': patch
---

tree-shakable
5 changes: 5 additions & 0 deletions .changeset/sharp-nails-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tszhong0411/eslint-config': patch
---

tree-shakable
5 changes: 5 additions & 0 deletions .changeset/yellow-suns-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tszhong0411/prettier-config': patch
---

tree-shakable
1 change: 1 addition & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"postpublish": "bash ./scripts/update-git-repo.sh",
"type-check": "tsc --noEmit"
},
"sideEffects": false,
"types": "./dist/index.d.ts",
"dependencies": {
"@eslint-react/eslint-plugin": "^1.5.15",
Expand Down
5 changes: 3 additions & 2 deletions packages/eslint-config/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/index.ts'],
entry: ['src/**/*.ts'],
dts: true,
format: ['esm'],
target: 'esnext'
target: 'esnext',
clean: true
})
1 change: 1 addition & 0 deletions packages/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"lint:fix": "eslint --fix .",
"type-check": "tsc --noEmit"
},
"sideEffects": false,
"dependencies": {
"@mdx-js/mdx": "^3.0.1",
"@mdx-js/react": "^3.0.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/mdx/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export default defineConfig({
},
dts: true,
format: ['esm'],
target: 'esnext'
target: 'esnext',
clean: true
})
1 change: 1 addition & 0 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"lint:fix": "eslint --fix .",
"type-check": "tsc --noEmit"
},
"sideEffects": false,
"types": "./dist/index.d.ts",
"dependencies": {
"prettier-plugin-package-perfection": "^1.1.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/prettier-config/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/index.ts'],
entry: ['src/**/*.ts'],
dts: true,
format: ['esm'],
target: 'esnext'
target: 'esnext',
clean: true
})
1 change: 1 addition & 0 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"lint:fix": "eslint --fix .",
"type-check": "tsc --noEmit"
},
"sideEffects": false,
"types": "./dist/index.d.ts",
"devDependencies": {
"@tszhong0411/eslint-config": "workspace:*",
Expand Down
5 changes: 3 additions & 2 deletions packages/shared/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/index.ts'],
entry: ['src/**/*.ts'],
dts: true,
format: ['esm'],
target: 'esnext'
target: 'esnext',
clean: true
})
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"lint:fix": "eslint --fix .",
"type-check": "tsc --noEmit"
},
"sideEffects": false,
"types": "./dist/index.d.ts",
"dependencies": {
"@icons-pack/react-simple-icons": "^9.5.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/index.ts'],
entry: ['src/**/*@(ts|tsx)'],
dts: true,
format: ['esm'],
target: 'esnext',
clean: true,
banner: {
js: '"use client";'
}
Expand Down
1 change: 1 addition & 0 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"lint:fix": "eslint --fix .",
"type-check": "tsc --noEmit"
},
"sideEffects": false,
"types": "./dist/index.d.ts",
"dependencies": {
"clsx": "^2.1.1",
Expand Down
5 changes: 3 additions & 2 deletions packages/utils/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/index.ts'],
entry: ['src/**/*.ts'],
dts: true,
format: ['esm'],
target: 'esnext'
target: 'esnext',
clean: true
})
1 change: 1 addition & 0 deletions turbo/generators/templates/package/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"import": "./dist/index.js"
}
},
"sideEffects": false,
{{else}}
"main": "./src/index.ts",
{{/if}}
Expand Down
5 changes: 3 additions & 2 deletions turbo/generators/templates/package/tsup.config.ts.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/index.ts'],
entry: ['src/**/*.ts'],
dts: true,
format: ['esm'],
target: 'esnext'
target: 'esnext',
clean: true
})

0 comments on commit ab40895

Please sign in to comment.