Skip to content
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

web:rollup executor doesn't produce declarations with compiler set to swc #9059

Closed
j3ski opened this issue Feb 21, 2022 · 52 comments
Closed

Comments

@j3ski
Copy link

j3ski commented Feb 21, 2022

Current Behavior

When running nx build for my buildable library I don't get d.ts files in the output directory.

Expected Behavior

d.ts files should be generated.

Steps to Reproduce

  1. Generate a buildable library with --compiler swc
  2. Build it

Environment

Node : 16.10.0
   OS   : darwin arm64
   yarn : 1.22.17

   nx : 13.8.3
   @nrwl/angular : undefined
   @nrwl/cli : 13.8.3
   @nrwl/cypress : 13.8.3
   @nrwl/detox : undefined
   @nrwl/devkit : 13.8.3
   @nrwl/eslint-plugin-nx : 13.8.3
   @nrwl/express : undefined
   @nrwl/jest : 13.8.3
   @nrwl/js : 13.8.3
   @nrwl/linter : 13.8.3
   @nrwl/nest : undefined
   @nrwl/next : undefined
   @nrwl/node : undefined
   @nrwl/nx-cloud : undefined
   @nrwl/react : 13.8.3
   @nrwl/react-native : undefined
   @nrwl/schematics : undefined
   @nrwl/storybook : 13.8.3
   @nrwl/tao : 13.8.3
   @nrwl/web : 13.8.3
   @nrwl/workspace : 13.8.3
   typescript : 4.4.4
   rxjs : 6.6.7
   ---------------------------------------
   Community plugins:
@FrozenPandaz FrozenPandaz added blocked: retry with latest Retry with latest release or head. scope: js labels Mar 14, 2022
@FrozenPandaz
Copy link
Collaborator

I see this resolved in the latest Nx. Can you please retry with the latest version?

In fact, I also see it resolved in 13.8.3. 🤔

If you do not see this resolved, can you please provide a repo so we can reproduce the issue?

@j3ski
Copy link
Author

j3ski commented Mar 15, 2022

Hi @FrozenPandaz
No, this is not resolved in the latest Nx. I am able to reproduce it with 13.8.8. Here is a repo: https://github.com/j3ski/nx-react-swc

@owen26
Copy link
Contributor

owen26 commented Mar 15, 2022

I'm having the same issue too. And from what I can see in the swc thread

swc-project/swc#657

It seems like a missing feature so I thought the missed types in NX are expected.

Not a big issue for compiling and bundling apps, but for libs that mean to be published to NPM, this is an essential feature.

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Mar 30, 2022
@j3ski
Copy link
Author

j3ski commented Apr 1, 2022

Ping. Still relevant.

@github-actions github-actions bot removed the stale label Apr 2, 2022
kuus added a commit to knitkode/kjam that referenced this issue Apr 6, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Apr 16, 2022
@nezdemkovski
Copy link

Still relevant

@github-actions github-actions bot removed the stale label Apr 18, 2022
@github-actions
Copy link

github-actions bot commented May 3, 2022

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@sergiocarneiro
Copy link

This issue still exists

@sahil-shubham
Copy link

Still relevant. Had to change compiler to babel in project.json to fix it.

@kjrocker
Copy link

kjrocker commented Oct 4, 2022

I also ran into this issue. Having to switch back to babel and lose my SWC performance improvements

@tobysmith568
Copy link

@FrozenPandaz would you consider removing the blocked tag that you added to this? This issue is still present in the latest version

@FrozenPandaz FrozenPandaz reopened this Oct 7, 2022
@jeffgaynor
Copy link

Same experience here with swc vs babel.

@github-actions github-actions bot removed the stale label Oct 8, 2022
@tobysmith568
Copy link

Thanks for re-opening, @FrozenPandaz. What needs to be done to remove the blocked tag? Other people above have posted repros

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Oct 25, 2022
@nezdemkovski
Copy link

Still relevant.

@github-actions
Copy link

github-actions bot commented May 4, 2023

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label May 4, 2023
@romhayh
Copy link
Contributor

romhayh commented May 7, 2023

Still relevant

@github-actions github-actions bot removed the stale label May 8, 2023
@DreadfulBot
Copy link

  • stil relevant

@ShayDavidson
Copy link

still relevant

@ShayDavidson
Copy link

Based on the comment by @Chanki-Min, I've created a custom version of the rollup executor that includes the missing useSwc check:

Just add these 4 files into a folder in your mono-repo, e.g. ./executors/rollup:
https://gist.github.com/ShayDavidson/e89751a5bc57a17ca6846dfd68aabf45

And then in the project.json, reference it like this:

"build": {
      "executor": "./executors/rollup:rollup",
	 ...
}

It does generate the type declarations, but I'm not sure if there are other bad side-effects of this (will update this comment if I find any).

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label May 31, 2023
@DreadfulBot
Copy link

active

@github-actions github-actions bot removed the stale label Jun 1, 2023
@noneall
Copy link

noneall commented Jun 8, 2023

this is still relevant

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Jun 23, 2023
@pawanrana1992
Copy link

How it can be close, it is still relevant. without giving and reply and resulations, this thread closed multiple times. Dear team please provide the valid fix for this. bcs of this issue, me and my team are not able to directly use the nx, and in this case need to use babel instead of swc with webpack instead of NX !!!!

@github-actions github-actions bot removed the stale label Jun 26, 2023
@Chanki-Min
Copy link
Contributor

Seems like nx contributers has busy days. I'm gonna make PR for this (in weekends?)

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Jul 20, 2023
@YonatanKra
Copy link

Can this be solved?
It still happens in the latest 15.x and 16.x

@github-actions github-actions bot removed the stale label Jul 21, 2023
@Chanki-Min
Copy link
Contributor

Chanki-Min commented Jul 30, 2023

this issue fixed by #18342

cc @YonatanKra

@Chanki-Min
Copy link
Contributor

Can we close this issue @jaysoo ?

Seems like this closed by #18342

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests