nx
nx copied to clipboard
@nrwl/js:tsc without bundler generates package.json with main referencing *.cjs instead of *.js
Current Behavior
@nrwl/js:tsc with bundler=none generates package.json with main referencing index.cjs (instead of index.js as before) The file generated is index.js, so users of the library can't find the main entry point.
Expected Behavior
Generate the correct entry point in package.json. This worked in 14.7.6
Steps to Reproduce
Generate buildable library with @nrwl/js:tsc and bundler=none, then build.
Failure Logs
Cannot find module '...\index.cjs'. Please verify that the package.json has a valid "main" entry
Environment
Node : 16.16.0 OS : win32 x64 yarn : 1.22.19
nx : 14.7.8 @nrwl/angular : 14.7.8 @nrwl/cypress : 14.7.8 @nrwl/detox : Not Found @nrwl/devkit : 14.7.8 @nrwl/eslint-plugin-nx : 14.7.8 @nrwl/expo : Not Found @nrwl/express : Not Found @nrwl/jest : 14.7.8 @nrwl/js : 14.7.8 @nrwl/linter : 14.7.8 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/nx-cloud : Not Found @nrwl/nx-plugin : Not Found @nrwl/react : Not Found @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : 14.7.8 @nrwl/web : Not Found @nrwl/workspace : 14.7.8 typescript : 4.8.3
Local workspace plugins:
Community plugins: