-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Turbopack * vercel/turborepo#7027 <!-- Donny/강동윤 - Update `swc_core` to `v0.87.28` --> --- ### What? Update swc crates ### Why? Required for #57718. `styled-jsx` crate now has a hook to transform CSS code using a Rust-side API ### How? Fixes #57718 Closes PACK-2256
- Loading branch information
Showing
14 changed files
with
269 additions
and
162 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
packages/next-swc/crates/next-core/src/next_shared/transforms/styled_jsx.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
use anyhow::Result; | ||
use turbo_tasks::Vc; | ||
use turbopack_binding::turbopack::{ | ||
ecmascript::OptionTransformPlugin, | ||
core::environment::RuntimeVersions, ecmascript::OptionTransformPlugin, | ||
ecmascript_plugin::transform::styled_jsx::StyledJsxTransformer, | ||
}; | ||
|
||
/// Returns a transform plugin for the relay graphql transform. | ||
#[turbo_tasks::function] | ||
pub async fn get_styled_jsx_transform_plugin( | ||
use_lightningcss: bool, | ||
target_browsers: Vc<RuntimeVersions>, | ||
) -> Result<Vc<OptionTransformPlugin>> { | ||
let versions = *target_browsers.await?; | ||
|
||
Ok(Vc::cell(Some(Vc::cell( | ||
Box::new(StyledJsxTransformer::new(use_lightningcss)) as _, | ||
Box::new(StyledJsxTransformer::new(use_lightningcss, versions)) as _, | ||
)))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters