Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
1fac9a1b
Unverified
Commit
1fac9a1b
authored
Feb 13, 2026
by
Niklas Mischkulnig
Committed by
GitHub
Feb 13, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to swc 56 (#89111)
parent
30dbf5ca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
418 additions
and
342 deletions
+418
-342
Cargo.lock
Cargo.lock
+391
-302
Cargo.toml
Cargo.toml
+10
-10
chain_transforms.rs
crates/next-custom-transforms/src/chain_transforms.rs
+5
-9
full.rs
crates/next-custom-transforms/tests/full.rs
+1
-1
output.js
.../next-custom-transforms/tests/loader/auto-cjs/1/output.js
+3
-8
output.js
...tom-transforms/tests/loader/auto-cjs/react-prod/output.js
+0
-4
output.js
...ext-custom-transforms/tests/loader/front/attr-1/output.js
+1
-1
output.js
...next-custom-transforms/tests/loader/issue-32553/output.js
+1
-0
output.js
...next-custom-transforms/tests/loader/issue-40231/output.js
+0
-1
Cargo.toml
crates/next-napi-bindings/Cargo.toml
+1
-0
Cargo.toml
turbopack/crates/turbopack-ecmascript/Cargo.toml
+0
-1
5c1d0_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js
...napshot_swc_transforms_preset_env_input_index_5aaf1327.js
+3
-3
780ce_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js.map
...hot_swc_transforms_preset_env_input_index_5aaf1327.js.map
+2
-2
No files found.
Cargo.lock
View file @
1fac9a1b
This diff is collapsed.
Click to expand it.
Cargo.toml
View file @
1fac9a1b
...
...
@@ -336,25 +336,25 @@ turbopack-trace-utils = { path = "turbopack/crates/turbopack-trace-utils" }
turbopack-wasm
=
{
path
=
"turbopack/crates/turbopack-wasm"
}
# SWC crates
swc_core
=
{
version
=
"5
4
.0.0"
,
features
=
[
swc_core
=
{
version
=
"5
6
.0.0"
,
features
=
[
"ecma_loader_lru"
,
"ecma_loader_parking_lot"
,
"parallel_rayon"
,
]
}
swc_plugin_backend_wasmer
=
{
version
=
"
6
.0.0"
}
swc_plugin_backend_wasmer
=
{
version
=
"
7
.0.0"
}
testing
=
"19.0.0"
# Keep consistent with preset_env_base through swc_core
browserslist-rs
=
"0.19.0"
mdxjs
=
"1.0.3"
modularize_imports
=
"0.1
08
.0"
styled_components
=
"0.13
6
.0"
styled_jsx
=
"0.11
1
.0"
swc_emotion
=
"0.11
2
.0"
swc_relay
=
"0.8
2
.0"
react_remove_properties
=
"0.6
2
.0"
remove_console
=
"0.6
3
.0"
preset_env_base
=
"
6
.0.0"
modularize_imports
=
"0.1
10
.0"
styled_components
=
"0.13
8
.0"
styled_jsx
=
"0.11
3
.0"
swc_emotion
=
"0.11
4
.0"
swc_relay
=
"0.8
4
.0"
react_remove_properties
=
"0.6
4
.0"
remove_console
=
"0.6
5
.0"
preset_env_base
=
"
7
.0.0"
# General Deps
...
...
crates/next-custom-transforms/src/chain_transforms.rs
View file @
1fac9a1b
...
...
@@ -161,21 +161,17 @@ where
fn_pass
(
move
|
program
|
{
if
let
Some
(
config
)
=
opts
.styled_jsx
.to_option
()
{
let
target_browsers
=
opts
.css_env
.as_ref
()
.map
(|
env
|
{
targets_to_versions
(
env
.targets
.clone
(),
None
)
.expect
(
"failed to parse env.targets"
)
})
.unwrap_or_default
();
let
target_browsers
=
opts
.css_env
.as_ref
()
.map
(|
env
|
{
targets_to_versions
(
env
.targets
.clone
(),
None
)
.expect
(
"failed to parse env.targets"
)
});
program
.mutate
(
styled_jsx
::
visitor
::
styled_jsx
(
cm
.clone
(),
&
file
.name
,
&
styled_jsx
::
visitor
::
Config
{
use_lightningcss
:
config
.use_lightningcss
,
browsers
:
*
target_browsers
,
browsers
:
*
target_browsers
.map
(|
t
|
t
.versions
)
.unwrap_or_default
()
,
},
&
styled_jsx
::
visitor
::
NativeConfig
{
process_css
:
None
},
))
...
...
crates/next-custom-transforms/tests/full.rs
View file @
1fac9a1b
...
...
@@ -38,7 +38,7 @@ fn test(input: &Path, minify: bool) {
output_path
:
Some
(
output
.clone
()),
config
:
swc_core
::
base
::
config
::
Config
{
is_module
:
Some
(
swc_core
::
base
::
config
::
IsModule
::
Bool
(
true
)
),
is_module
:
Some
(
swc_core
::
base
::
config
::
IsModule
::
Unknown
),
jsc
:
swc_core
::
base
::
config
::
JscConfig
{
minify
:
if
minify
{
...
...
crates/next-custom-transforms/tests/loader/auto-cjs/1/output.js
View file @
1fac9a1b
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
_interop_require_default
=
require
(
"@swc/helpers/_/_interop_require_default"
);
var
_esm
=
/*#__PURE__*/
_interop_require_default
.
_
(
require
(
"esm"
));
console
.
log
(
_esm
.
default
.
foo
);
module
.
exports
=
_esm
.
default
;
import
mixed
from
'esm'
;
console
.
log
(
mixed
.
foo
);
module
.
exports
=
mixed
;
crates/next-custom-transforms/tests/loader/auto-cjs/react-prod/output.js
View file @
1fac9a1b
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
_class_call_check
=
require
(
"@swc/helpers/_/_class_call_check"
);
// This file should not import helpers using ESM syntax
var
E
=
function
Foo
()
{
...
...
crates/next-custom-transforms/tests/loader/front/attr-1/output.js
View file @
1fac9a1b
import
_JSXStyle
from
"styled-jsx/style"
;
export
default
function
Foo
()
{
return
/*#__PURE__*/
React
.
createElement
(
"div"
,
{
render
:
function
(
v
)
{
render
:
function
render
(
v
)
{
return
/*#__PURE__*/
React
.
createElement
(
"form"
,
{
className
:
"jsx-3d44fb7892a1f38b"
});
...
...
crates/next-custom-transforms/tests/loader/issue-32553/output.js
View file @
1fac9a1b
;
/*#__PURE__*/
React
.
createElement
(
"div"
,
null
,
"children"
);
'<>hello</>'
;
crates/next-custom-transforms/tests/loader/issue-40231/output.js
View file @
1fac9a1b
"use strict"
;
function
loadSomethingWithDynamicImport
(
param
)
{
return
import
(
"something/"
.
concat
(
param
)).
then
(
function
(
r
)
{
return
r
.
default
;
...
...
crates/next-napi-bindings/Cargo.toml
View file @
1fac9a1b
...
...
@@ -82,6 +82,7 @@ once_cell = { workspace = true }
swc_core
=
{
workspace
=
true
,
features
=
[
"base"
,
"base_module"
,
"common_concurrent"
,
"ecma_ast"
,
"ecma_ast_serde"
,
...
...
turbopack/crates/turbopack-ecmascript/Cargo.toml
View file @
1fac9a1b
...
...
@@ -72,7 +72,6 @@ swc_core = { workspace = true, features = [
"ecma_parser"
,
"ecma_preset_env"
,
"ecma_transforms"
,
"ecma_transforms_module"
,
"ecma_transforms_react"
,
"ecma_transforms_optimization"
,
"ecma_transforms_typescript"
,
...
...
turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/5c1d0_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js
View file @
1fac9a1b
...
...
@@ -716,7 +716,7 @@ function asyncModule(body, hasAwait) {
Object
.
defineProperty
(
module
,
'namespaceObject'
,
attributes
);
function
handleAsyncDependencies
(
deps
)
{
var
currentDeps
=
wrapDeps
(
deps
);
var
getResult
=
function
()
{
var
getResult
=
function
getResult
()
{
return
currentDeps
.
map
(
function
(
d
)
{
if
(
d
[
turbopackError
])
throw
d
[
turbopackError
];
return
d
[
turbopackExports
];
...
...
@@ -1416,7 +1416,7 @@ function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
*/
// Used by the backend
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-unused-vars
var
getOrInstantiateModuleFromParent
=
function
(
id
,
sourceModule
)
{
var
getOrInstantiateModuleFromParent
=
function
getOrInstantiateModuleFromParent
(
id
,
sourceModule
)
{
var
module
=
moduleCache
[
id
];
if
(
module
)
{
if
(
module
.
error
)
{
...
...
@@ -1747,7 +1747,7 @@ var BACKEND;
resolved
:
false
,
loadingStarted
:
false
,
promise
:
promise
,
resolve
:
function
()
{
resolve
:
function
resolve1
()
{
resolver
.
resolved
=
true
;
resolve
();
},
...
...
turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/780ce_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js.map
View file @
1fac9a1b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment