Skip to main content

Questions tagged [swc]

An Adobe SWC file is a package of precompiled Flash symbols and ActionScript code that allows a Flash or Flex developer to distribute classes and assets, or to avoid recompiling symbols and code that will not change. Please, do not use this tag for questions related to the SWC JavaScript compiler (use [swc-compiler] instead).

swc
0 votes
1 answer
18 views

Replace a TaggedTemplateExpression with a CallExpression in a SWC Rust Plugin

I'm working on a SWC Rust WASM plugin to transform JavaScript. Overall SWC and its API are well designed. However currently I struggle to convert a TaggedTemplateExpression to a CallExpression like in ...
jantimon's user avatar
  • 37.7k
0 votes
0 answers
22 views

How do I pass parameters to the swc-plugin

I want to pass parameters to a custom swc-plugin to dynamically replace the value of a variable. How do I do this? const swc = require("@swc/core"); const fs = require("fs"); ...
yyy chen's user avatar
0 votes
1 answer
54 views

Injecting Comments with a SWC Rust plugin

I am trying to inject a comment to existing javascript code. In Babel there is the addComment helper which can be called on a AST node. Here is a simple (but rather silly) transformation written in ...
jantimon's user avatar
  • 37.7k
0 votes
0 answers
19 views

Vite compiled file fails with error during namespace mapping

I have a node.js app that I want to build with Vite/SWC. Config file: import { defineConfig } from 'vite'; import { VitePluginNode } from 'vite-plugin-node'; import path from 'path'; export default ...
Vololodymyr's user avatar
  • 2,176
0 votes
0 answers
28 views

Next.JS 13+ and IE11

How can I make Next.JS 13 application to be compatible with IE11. it uses SWC and I'm not sure how to fix SCRIPT1010: Expected identifier and SCRIPT1002: Syntax error errors
A.A's user avatar
  • 3,736
2 votes
0 answers
137 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,217
0 votes
1 answer
115 views

NestJs dependency injection in constructor is undefined with class-based provider but works with token provider

I am trying to get NestJs dependency injection to work without needing a provider 'token'. For a simple example, this setup works: @Injectable() export class AClass { constructor() { console.log(...
okhobb's user avatar
  • 849
0 votes
1 answer
252 views

Migrate from Babel to Nextjs SWC encountering Minified React error

When I removed my current .babelrc in order to force NextJS 13 using SWC instead. It's showing the error: Error: Minified React error #130. But when I add the .babelrc file again everything worked ...
Ted Vu's user avatar
  • 99
1 vote
1 answer
120 views

Instagram-like CSS class names obfuscation for NextJS 14 with SWC

I noticed that Instagram Direct often use Tailwind CSS for class names. But somehow they managed to transform it to non-readable format (obfuscation), so people could not run bots for content crawling....
Grisaia's user avatar
  • 65
2 votes
0 answers
299 views

Why is Next.js trying to load @next/swc-linux-arm64-gnu despite .babelrc being present?

I am getting the error logs when trying to load a page in dev environment: 2024-03-11 17:17:06 yarn run v1.22.19 2024-03-11 17:17:06 $ next dev -p 4000 2024-03-11 17:17:10 Disabled SWC as ...
Flip's user avatar
  • 6,581
0 votes
2 answers
264 views

swc-loader not showing typescript errors in console

I'm switching from ts-loader to swc-loader following this bloq. However, after migrating, it fails to show me the most basic Typescript errors in the console. For example, I have the following line ...
Genarito's user avatar
  • 3,293
0 votes
0 answers
56 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
240 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
1 answer
1k views

Failed to Load SWC Binary Error in Next.js Development Server

I encountered an issue while running my Next.js project using the yarn run dev command. The error message is as follows in the image Error Details: Next.js Version: 14.0.3 Local Server: http://...
Awais Ahmad's user avatar
0 votes
1 answer
330 views

How to resolve path error in compilation?

I have nest config - nestjs 10, prisma 5.6.0, swc schema.prisma file generator client { provider = "prisma-client-js" output = "../generated/client" ...
Aslero's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
20