Currently, NX overwrites the type in our package.json in the dist folder if we use the @nx/vite:build executor with the generatePackageJson: true option. We want to use type: 'commonjs', but we get type: 'module' instead.
Expected Behavior
@nx/vite:build does not overwrite the type in package.json if it's already set in the library's package.json when used with the generatePackageJson: true option
GitHub Repo
No response
Steps to Reproduce
Create a new library using NX JS.
Use Vite as the bundler.
Add "type": "commonjs" to package.json.
Add "generatePackageJson": true to the @nx/vite:build.options.
Build the library.
The package.json in the dist folder does not have "type": "commonjs".
Current Behavior
Currently, NX overwrites the type in our package.json in the dist folder if we use the @nx/vite:build executor with the generatePackageJson: true option. We want to use type: 'commonjs', but we get type: 'module' instead.
Expected Behavior
@nx/vite:build does not overwrite the type in package.json if it's already set in the library's package.json when used with the generatePackageJson: true option
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response