Skip to content

Commit 3582c78

Browse files
committed
feat: ts lib check
1 parent 4bb5d1f commit 3582c78

File tree

4 files changed

+167
-18
lines changed

4 files changed

+167
-18
lines changed

pnpm-lock.yaml

Lines changed: 132 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rspack/javascript-api/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "example-javascript-api",
3+
"version": "1.0.0",
4+
"private": true,
5+
"license": "MIT",
6+
"main": "index.js",
7+
"scripts": {
8+
"build": "tsc"
9+
},
10+
"devDependencies": {
11+
"@rspack/core": "1.4.0-rc.0",
12+
"@types/node": "^22.15.32",
13+
"typescript": "^5.8.3"
14+
}
15+
}

rspack/javascript-api/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { rspack, RspackOptions, Stats } from '@rspack/core';
2+
3+
export default function build(
4+
options: RspackOptions,
5+
callback: (err: Error | null, stats: Stats) => void
6+
): void {
7+
rspack(options, callback);
8+
}

0 commit comments

Comments
 (0)