Skip to content

Commit

Permalink
refactor: remove post-build script
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Aug 2, 2023
1 parent 5b99890 commit 8f3c557
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 27 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"scripts": {
"lint": "eslint --cache .",
"lint:fix": "pnpm run lint --fix",
"build": "tsup && tsx scripts/postbuild.mts",
"build": "tsup",
"dev": "pnpm run -C playground dev",
"test": "vitest",
"release": "bumpp && pnpm publish",
Expand Down Expand Up @@ -123,7 +123,7 @@
"eslint-define-config": "^1.22.0",
"fast-glob": "^3.3.1",
"prettier": "^3.0.0",
"tsup": "^7.1.0",
"tsup": "^7.2.0",
"tsx": "^3.12.7",
"typescript": "^5.1.6",
"vite": "^4.4.8",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions scripts/postbuild.mts

This file was deleted.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ declare global {
const jsxRaw: (variable: any) => any
}

export default createUnplugin<Options>((options = {}) => {
export default createUnplugin<Options | undefined, false>((options = {}) => {
const opt = resolveOption(options)
const filter = createFilter(opt.include, opt.exclude)

Expand Down
4 changes: 3 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['./src'],
entry: ['./src/*.ts'],
format: ['cjs', 'esm'],
target: 'node16.14',
splitting: true,
cjsInterop: true,
clean: true,
dts: true,
})

0 comments on commit 8f3c557

Please sign in to comment.