Skip to main content

All Questions

Tagged with
2 votes
0 answers
184 views

building nestjs app with SWC inside an nx-based monorepo does not bundle /libs source code but references imports instead?

I'm trying to find out how to configure SWC in a way that builds the applications inside my monorepo with the source code from my libs directory, like I used to do with webpack (although much much ...
SebastianG's user avatar
  • 9,247
0 votes
0 answers
59 views

Cargo install swc_cli not working with error

Here is the Rust version % cargo --version cargo 1.75.0 (1d8b05cdd 2023-11-20) When I use cargo to install swc_cli cargo install swc_cli Cargo install swc_cli not working with the following error: ...
yyy chen's user avatar
0 votes
0 answers
258 views

After installing SWC in NestJS with Typescript ttshivers/automapper is not mapping

I'm developing a Nest.js and I use different packages such as @ttshivers/automapper to map between entities and dtos. Since decorating class members with @Automap() is verbose, I followed the steps in ...
Aldemar Cuartas Carvajal's user avatar
0 votes
0 answers
134 views

Combining Babel Library in SWC Next.js: Integrate external Babel-dependent package while preserving SWC compilation

In my Next.js project, the primary compiler is SWC. However, I have a component that relies on an external library compiled with Babel. Is it feasible to configure Next.js to use Babel exclusively for ...
Rodolfo Campos's user avatar
1 vote
0 answers
87 views

Cannot import modules in node command

I have this npm command "create-new": "node --no-warnings --loader ts-node/esm tools/createNewCommand.ts" in tools directory. If I try to import from src/ I get this error: ...
user19210100's user avatar
2 votes
0 answers
1k views

How to properly configure swc-loader with webpack, when switching from ts-loader for better build performance

I have a ts-loader configuration in webpack, test: /\.tsx?$/, use: [ { loader: 'ts-loader', options: { transpileOnly: true } } ] This was taking like 5 mins of build time. so, ...
Adharsh M's user avatar
  • 3,612
3 votes
1 answer
3k views

SWC plugins not working / Any plugin I compile breaks Next js

The Next js framework uses the SWC compiler instead of Babel. I need to write a plugin for SWC. Everything was working fine, but something happened. Now any plugin that I compile on my computer doesn'...
Roman's user avatar
  • 485
1 vote
0 answers
190 views

Is there a way to omit a package or library from being minified or ignored by SWC?

So I am building an audio chatroom in Next.js. For the chatting and calling features, I am using Agora that makes use of the agora-rtm-sdk agora-rtm-sdk and agora-rtc-sdk-ng agora-rtc packages. So ...
Tim Mwaura's user avatar
8 votes
2 answers
9k views

swc not resolving import path aliases

I have a typescript project which I'm transpiling with swc. I'm having trouble getting swc to resolve path aliases defined in either tsconfig.json or .swcrc. The module aliases are resolved properly ...
minnow's user avatar
  • 343