Skip to content

Commit

Permalink
build: use esbuild plugin instead of tsc in postbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
davidenke committed Jan 4, 2024
1 parent 867ca41 commit 64345dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions esbuild.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { parseArgs } from 'node:util';
import { type BuildOptions, build, context } from 'esbuild';
import { dtsPlugin } from 'esbuild-plugin-d.ts';

const { values } = parseArgs({
options: {
Expand All @@ -19,6 +20,7 @@ const options: BuildOptions = {
splitting: false,
target: ['es6'],
loader: { '.html': 'copy', '.jpg': 'copy', '.png': 'copy' },
plugins: [dtsPlugin()],
};

try {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"test:ci": "npm test -- --ci --runInBand --reporters=default --reporters=jest-junit",
"prebuild": "rimraf dist",
"build": "ts-node esbuild.config.ts",
"postbuild": "tsc --emitDeclarationOnly --declaration --outFile dist/index.d.ts src/index.ts",
"start": "ts-node esbuild.config.ts --serve",
"release": "release-it --ci --verbose"
},
Expand Down

0 comments on commit 64345dd

Please sign in to comment.