Skip to content

Commit c8a0476

Browse files
authored
chore: migrate to rslib and publish dual packages (#19)
1 parent b983ad6 commit c8a0476

File tree

3 files changed

+320
-6
lines changed

3 files changed

+320
-6
lines changed

package.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,27 @@
44
"repository": "https://github.com/rspack-contrib/rspack-lite-tapable",
55
"license": "MIT",
66
"description": "Lite weight tapable for Rspack",
7-
"main": "./dist/index.js",
7+
"type": "module",
8+
"main": "./dist/index.cjs",
9+
"module": "./dist/index.js",
810
"types": "./dist/index.d.ts",
11+
"exports": {
12+
".": {
13+
"types": "./dist/index.d.ts",
14+
"require": "./dist/index.cjs",
15+
"import": "./dist/index.js"
16+
}
17+
},
918
"scripts": {
10-
"build": "tsc -b ./tsconfig.build.json",
11-
"dev": "tsc -b -w",
19+
"build": "rslib build",
20+
"dev": "rslib build --watch",
1221
"lint": "biome check .",
1322
"lint:write": "biome check . --write",
1423
"prepare": "simple-git-hooks && npm run build",
1524
"test": "rstest run",
1625
"release": "node ./scripts/release.mjs"
1726
},
18-
"files": [
19-
"dist"
20-
],
27+
"files": ["dist"],
2128
"simple-git-hooks": {
2229
"pre-commit": "npx nano-staged"
2330
},
@@ -28,6 +35,7 @@
2835
},
2936
"devDependencies": {
3037
"@biomejs/biome": "^1.9.4",
38+
"@rslib/core": "^0.17.1",
3139
"@rspack/core": "^1.6.0",
3240
"@rstest/core": "0.6.1",
3341
"@types/node": "^22.18.13",

0 commit comments

Comments
 (0)