nx icon indicating copy to clipboard operation
nx copied to clipboard

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

Open j3ski opened this issue 3 years ago โ€ข 46 comments

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:

j3ski avatar Feb 21 '22 14:02 j3ski

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. :thinking:

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

FrozenPandaz avatar Mar 14 '22 21:03 FrozenPandaz

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

j3ski avatar Mar 15 '22 07:03 j3ski

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

https://github.com/swc-project/swc/issues/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.

owen26 avatar Mar 15 '22 09:03 owen26

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[bot] avatar Mar 30 '22 00:03 github-actions[bot]

Ping. Still relevant.

j3ski avatar Apr 01 '22 11:04 j3ski

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[bot] avatar Apr 16 '22 00:04 github-actions[bot]

Still relevant

nezdemkovski avatar Apr 17 '22 17:04 nezdemkovski

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[bot] avatar May 03 '22 00:05 github-actions[bot]

This issue still exists

sergiocarneiro avatar Jun 04 '22 04:06 sergiocarneiro

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

sahil-shubham avatar Jul 12 '22 12:07 sahil-shubham

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

kjrocker avatar Oct 04 '22 16:10 kjrocker

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

tobysmith568 avatar Oct 07 '22 15:10 tobysmith568

Same experience here with swc vs babel.

jeffgaynor avatar Oct 07 '22 17:10 jeffgaynor

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

tobysmith568 avatar Oct 10 '22 10:10 tobysmith568

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[bot] avatar Oct 25 '22 00:10 github-actions[bot]

Still relevant.

nezdemkovski avatar Oct 26 '22 12:10 nezdemkovski

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[bot] avatar Nov 11 '22 00:11 github-actions[bot]

Still relevant.

tobysmith568 avatar Nov 11 '22 10:11 tobysmith568

Still relevant

romhayh avatar Nov 21 '22 08:11 romhayh

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[bot] avatar Dec 06 '22 00:12 github-actions[bot]

Still relevant.

tobysmith568 avatar Dec 07 '22 11:12 tobysmith568

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[bot] avatar Dec 22 '22 00:12 github-actions[bot]

Does anyone know what and where something needs to be addressed? Is it a swc issue?

mhabegger avatar Dec 27 '22 06:12 mhabegger

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[bot] avatar Jan 11 '23 00:01 github-actions[bot]

Still relevant

nezdemkovski avatar Jan 11 '23 10:01 nezdemkovski

Still relevant

mderkach avatar Jan 19 '23 09:01 mderkach

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[bot] avatar Feb 03 '23 00:02 github-actions[bot]

Still relevant

tobysmith568 avatar Feb 03 '23 09:02 tobysmith568

because of this line, when we use swc, tsc is not running, so no d.t.s files

Chanki-Min avatar Feb 15 '23 09:02 Chanki-Min

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[bot] avatar Mar 02 '23 00:03 github-actions[bot]