Skip to content

Commit 3edff76

Browse files
committed
Add build scripts
1 parent 15e1a32 commit 3edff76

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

packages/@stylexjs/unplugin/package.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44
"private": false,
55
"description": "Universal bundler plugin for StyleX using unplugin",
66
"license": "MIT",
7-
"main": "src/index.js",
8-
"type": "module",
7+
"main": "./lib/index.js",
8+
"module": "./lib/es/index.mjs",
9+
"types": "./lib/index.d.ts",
10+
"exports": {
11+
"import": "./lib/es/index.mjs",
12+
"require": "./lib/index.js"
13+
},
914
"keywords": [
1015
"stylex",
1116
"css",
@@ -15,6 +20,12 @@
1520
"webpack",
1621
"rspack"
1722
],
23+
"scripts": {
24+
"build:cjs": "cross-env BABEL_ENV=cjs babel src/ --out-dir lib/ --copy-files",
25+
"build:esm": "cross-env BABEL_ENV=esm babel src/ --out-dir lib/es --out-file-extension .mjs",
26+
"build": "npm run build:cjs && npm run build:esm",
27+
"test": "jest"
28+
},
1829
"peerDependencies": {
1930
"unplugin": "^1.7.1"
2031
},
@@ -26,5 +37,8 @@
2637
"@stylexjs/babel-plugin": "0.16.2",
2738
"browserslist": "^4.24.0",
2839
"lightningcss": "^1.29.1"
29-
}
40+
},
41+
"files": [
42+
"lib/*"
43+
]
3044
}

0 commit comments

Comments
 (0)