New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(js): adjust destination directory for swc executor #9072
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/B7u29tnA6EFttyPpVAhWt7LPTxam [Deployment for 0aad7a1 canceled] |
* fix(js): bump swc deps versions * fix(js): change swc cli arguments to ensure it works in parity with tsc * fix(js): add "dts" flag to swc executor * fix(js): remove dts option as diff in perf is negligible * fix(js): change logic around swc cli so that outputPath isn't computed Co-authored-by: Chau Tran <ctran@Chaus-MacBook-Pro.local>
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Currently, we use
cwd
withexec()
to executeswc
in the project's root directory (eg:packages/lib-one
)swc
is executed with:srcPath
:../lib-one
destPath
:../../dist/packages/lib-one/src
This results in faulty behavior for libs with nested libs as well as libs with source code outside of
src
directory.For example (taken from https://github.com/nartc/mapper)
With the above setup,
@automapepr/classes/mapped-types
and@automapepr/classes/experimental/transformer-plugin
are "secondary entry points" to@automapepr/classes
. In addition, they have their ownbuild
target. A complete build ofclasses
is:With
nrwl/js:tsc
, the following artifact is produced:With
nrwl/js:swc
, the following is produced:Expected Behavior
nrwl/js:swc
produces artifacts similarly tonrwl/js:tsc
. Files are moved correctly intodist
swc
version is bumped to latestjest-setup
is added to defaultexclude
Related Issue(s)
Fixes #