You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using stripLeadingPaths with the @nx/js:swc executor, the package.json generated by generatePackageJson (and subsequent generateExportsField) does not strip these paths like swc, resulting in an invalid package.json.
I've tried a few combinations of various swc and typescript settings (namely baseUrl), but it looks like the package json generation is handled one level up and not affected by, say, .swcrc.
Expected Behavior
When stripLeadingPaths is true, the package.json should look more like this:
Current Behavior
When using
stripLeadingPaths
with the@nx/js:swc
executor, thepackage.json
generated bygeneratePackageJson
(and subsequentgenerateExportsField
) does not strip these paths like swc, resulting in an invalidpackage.json
.Example snippet from generated package:
I've tried a few combinations of various swc and typescript settings (namely baseUrl), but it looks like the package json generation is handled one level up and not affected by, say,
.swcrc
.Expected Behavior
When
stripLeadingPaths
istrue
, thepackage.json
should look more like this:GitHub Repo
Appears in https://github.com/CynicalBusiness/yaqlib when set in either
core
'sproject.json
or innx.json
.Steps to Reproduce
@nx/js:library
generator to generate a buildable library withswc
.project.json
(ornx.json
) to set the optionstripLeadingPaths
totrue
src
path is indeed stripped but package json incorrectly reflects this.Nx Report
Failure Logs
Package Manager Version
Yarn v4.6.0
Operating System
Additional Information
The included report and package manager version are the same from both my repo and a fresh workspace + library (with swc+jest+eslint).
The text was updated successfully, but these errors were encountered: