Closed
Description
Since the last version update (2.6.6) prettier-plugin-java can not be loaded by prettier-vscode (https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) anymore.
The culprit seems to be this change: 2e7a828
It changed the exports field in package.json and only includes "types" and "import". But the Vscode plugin tries to load the modules using require.resolve('prettier-plugin-java').
Node throws an exception No "exports" main defined in .../node_modules/prettier-plugin-java/package.json
Changing the exports to include a require element, fixes the problem.
"exports": {
".": {
"types": "./index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.js"
}
}
Metadata
Metadata
Assignees
Labels
No labels