Skip to content

Commit 7eda3ab

Browse files
authoredApr 1, 2024
fix(postcss): move to ESM first + dual ESM/CJS + missing @unocss/postcss/esm subpackage export (#3678)
1 parent 42187e2 commit 7eda3ab

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed
 

‎packages/postcss/package.json

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@unocss/postcss",
3+
"type": "module",
34
"version": "0.59.0-beta.1",
45
"description": "PostCSS plugin for UnoCSS",
56
"author": "sibbng <sibbngheid@gmail.com>",
@@ -18,13 +19,31 @@
1819
"sideEffects": false,
1920
"exports": {
2021
".": {
21-
"import": "./dist/index.mjs",
22-
"require": "./dist/index.cjs"
22+
"import": {
23+
"types": "./dist/index.d.mts",
24+
"default": "./dist/index.mjs"
25+
},
26+
"require": {
27+
"types": "./dist/index.d.cts",
28+
"default": "./dist/index.cjs"
29+
}
30+
},
31+
"./esm": {
32+
"types": "./dist/esm.d.mts",
33+
"default": "./dist/esm.mjs"
2334
}
2435
},
2536
"main": "dist/index.cjs",
2637
"module": "dist/index.mjs",
2738
"types": "dist/index.d.ts",
39+
"typesVersions": {
40+
"*": {
41+
"*": [
42+
"dist/*",
43+
"./*"
44+
]
45+
}
46+
},
2847
"files": [
2948
"dist"
3049
],
@@ -47,4 +66,4 @@
4766
"magic-string": "^0.30.8",
4867
"postcss": "^8.4.38"
4968
}
50-
}
69+
}

0 commit comments

Comments
 (0)