-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ecmascript-plugins): support swc ecmatransform plugins #5050
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
7 Ignored Deployments
|
✅ This change can build |
|
Looks like some of test snapshots failing with sourcemap differences, may comes with swc_core updates. |
Linux Benchmark for 778ffcbClick to view benchmark
|
CI failure is not caused by swc_core update. See #5049 |
@kdy1 hmm, any idea sourcemap would make differences then? The changes in this PR is not even enabled since it is behind compile time flag, also it doesn't affect normal transform's sourcemap. |
MacOS Benchmark for 778ffcb
Click to view full benchmark
|
7a61e9f
to
e565ee7
Compare
Linux Benchmark for da9d54d
Click to view full benchmark
|
MacOS Benchmark for da9d54d
Click to view full benchmark
|
e565ee7
to
637c6c7
Compare
Linux Benchmark for 9a59d6aClick to view benchmark
|
637c6c7
to
31454cb
Compare
Linux Benchmark for fcac6b7Click to view benchmark
|
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Outdated
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Outdated
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Outdated
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Show resolved
Hide resolved
MacOS Benchmark for fcac6b7
Click to view full benchmark
|
31454cb
to
ccdd3f0
Compare
Linux Benchmark for 0b67215Click to view benchmark
|
MacOS Benchmark for 0b67215
Click to view full benchmark
|
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Outdated
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Outdated
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Outdated
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Outdated
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Show resolved
Hide resolved
crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Show resolved
Hide resolved
Linux Benchmark for c9a2765Click to view benchmark
|
MacOS Benchmark for c918cae
Click to view full benchmark
|
f84f05f
to
86c2a18
Compare
Linux Benchmark for 215e9d1Click to view benchmark
|
MacOS Benchmark for 215e9d1
Click to view full benchmark
|
86c2a18
to
9ccf357
Compare
Linux Benchmark for 06d1dd4Click to view benchmark
|
MacOS Benchmark for 06d1dd4
Click to view full benchmark
|
9ccf357
to
c593d06
Compare
Linux Benchmark for cfd71deClick to view benchmark
|
MacOS Benchmark for cfd71de
Click to view full benchmark
|
…nsform_plugins.rs Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
…nsform_plugins.rs Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
…nsform_plugins.rs Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
…nsform_plugins.rs Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
c593d06
to
707f6e9
Compare
Linux Benchmark for f63593eClick to view benchmark
|
MacOS Benchmark for f63593e
Click to view full benchmark
|
## What * updates swc_core * updates turbopack # Turbopack Changes * vercel/turbo#5050 * vercel/turbo#5107 * vercel/turbo#5094
## What * updates swc_core * updates turbopack # Turbopack Changes * vercel/turbo#5050 * vercel/turbo#5107 * vercel/turbo#5094
Description
Part 1 for WEB-998.
This PR implements a new turbopack-ecmascript plugin for the swc's ecmatransform plugin. New transform
SwcEcmaTransformPluginsTransformer
accepts array of plugin module containsCompiledPluginModuleBytes
from swc's wasm plugin then executes it. It doesn't utilize SWC's internal cache mechanism to keep compiled / serialized wasm module (wasmer::Module
), instead expect turbopack manages it. For those reason, we only acceptsCompiledPluginModuleBytes
from swc as it is a serialized copy does not requires re-compilation, while swc have few other different representation to the module bytes.It is exposed as a separate feature instead of being default: there are some of platforms / targets we can't support plugins yet, and making it default will makes
next-swc
to fail to build.