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).

1 vote
0 answers
310 views

@swc/jest produces non-class code even if target is set to 2021

My jest.config.js: module.exports = { testEnvironment: "jsdom", testMatch: ["**/*.spec.ts", "**/*.spec.js"], testPathIgnorePatterns: ["/test/"], // UUID ...
user910046's user avatar
0 votes
1 answer
375 views

A storybook error related to 'emotion' occurred in an environment using swc

I am using the existing babel and switching to swc. But the following error occurred. Error: Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or ...
Hyeongrok's user avatar
3 votes
0 answers
475 views

Next.js 13 + Styled Components "Warning: Prop className did not match." error - how to migrate from babel to SWC?

When upgrading the Next version from 12 to 13 I got the error "Warning: Prop className did not match." pointing to styled-components. My initial setup was with babel, including babel-plugin-...
Matilda Brunemalm'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
2 votes
0 answers
157 views

How can I can get typescript to emit .js extension when importing modules?

In the browser this works: import blah from "../blah.js"; but if you don't specify the extension it doesnt: import blah from "../blah"; errors with I'm using typescript in an ...
Orión González's user avatar
4 votes
0 answers
642 views

Module transpilation within a Next.js project with SWC

I have a project in Next.js and Typescript where I am trying to ensure code splitting and tree shaking works well for our purposes. I recently upgraded to Next.js 13.x and migrated from Babel to SWC. ...
zkwsk's user avatar
  • 2,056
0 votes
0 answers
2k views

Error installing with installing @swc/jest inside Angular 15 and Jest

In an Angular and Jest project, we are looking to improve the response times of unit tests. Looking for solutions, everything pointed to using SWC within the project, we have already implemented it, ...
Jan Pereira's user avatar
3 votes
0 answers
3k views

SWC configuration of Node 18 with typescript with esm

Okay,so I have a problem with node. SWC builds everything correctly and I can run the app - great. The problem starts when I try to use "top-level await" feature. I just can't get it to work ...
MrVoland's user avatar
  • 243
0 votes
0 answers
2k views

Style loading issue, screen flickering in Next.js with styled-components and SWC

It seems like a silly problem because it happens within milliseconds, but it's annoying. When loading and reloading the page, it's just like the HTML, within milliseconds the styles are loaded. next....
Ton Almeida's user avatar
2 votes
0 answers
1k views

Babel config to SWC

Now I have such babel config on the project and I really want to rewrite this case under swc. Would anyone be able to help with this module.exports = { sourceMaps: true, presets: [ ...
Котик Вася's user avatar
3 votes
1 answer
2k views

How can I resolve ESM / require error using TS 4.8?

I use Node.js application and TS 4.8, and I updated package file-type, but now my project compilation fails with error [1] const _fileType = /#PURE/ _interopRequireWildcard(require("file-type&...
Victor Kozykin's user avatar
3 votes
1 answer
2k views

Migrating NextJS@11 to NextJS@12 with SWC config

I'm trying to migrate my NextJS App to version 12. it's working properly using babel config, but I like to change the environment to swc. I have the error below during production build: ./src/pages/...
MohammadJavad Seyyedi's user avatar
0 votes
1 answer
131 views

Using images from SWC libraries in Apache Royale 0.9.8

We are working on a migration project using Apache Royale and the project contains plenty of SWC files that contains JPG and PNG images. We have been trying to use them directly from the libs but ...
Piltsen's user avatar
  • 171
1 vote
2 answers
144 views

Haxe to SWC - protected getters/setters

I am porting a library from AS3 to Haxe and I need to make protected getters/setters. Target is a *.swc file. My Haxe code looks like this: private var foo(get, never):Int; @:getter(foo) private ...
naviator's user avatar
0 votes
0 answers
116 views

Can I publish a SWC without publishing a SWF?

In Adobe Animate CC, I want to make a SWC so that I can use vector assets in FlashDevelop that were drawn in Animate. However, when I publish my .fla, no .swc is generated unless a .swf is also ...
Kyle Delaney's user avatar
  • 12.1k

15 30 50 per page
1 2 3
4
5
20