Skip to content

Commit d0a626c

Browse files
committed
chore: enhance prettier-plugin-java package.json for module exports
- Add main and module fields to specify entry points for CommonJS and ESM. - Update exports structure to support both import and require formats with correct type definitions.
1 parent 0264eff commit d0a626c

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
"repository": "https://github.com/jhipster/prettier-java",
77
"license": "Apache-2.0",
88
"type": "module",
9+
"main": "./dist/index.cjs",
10+
"module": "./dist/index.mjs",
911
"exports": {
10-
"import": {
11-
"types": "./dist/index.d.mts",
12-
"default": "./dist/index.mjs"
13-
},
14-
"require": {
15-
"types": "./dist/index.d.cjs",
16-
"default": "./dist/index.cjs"
12+
".": {
13+
"import": {
14+
"types": "./dist/index.d.mts",
15+
"default": "./dist/index.mjs"
16+
},
17+
"require": {
18+
"types": "./dist/index.d.cts",
19+
"default": "./dist/index.cjs"
20+
}
1721
}
1822
},
1923
"files": [

0 commit comments

Comments
 (0)