{"record":{"id":"57e8410e1b5ed148","repo":"swc-project/swc","slug":"plugin-is-not-supported-with-current-swc-core-pl","errorCode":null,"errorMessage":"Plugin is not supported with current @swc/core. Plugin transform will be skipped.","messagePattern":"Plugin is not supported with current @swc/core\\. Plugin transform will be skipped\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/swc/src/config/mod.rs","lineNumber":869,"sourceCode":"            // Native runtime plugin target, based on assumption we have\n            // 1. no filesystem access, loading binary / cache management should be\n            // performed externally\n            // 2. native runtime compiles & execute wasm (i.e v8 on node, chrome)\n            #[cfg(all(feature = \"plugin\", target_arch = \"wasm32\"))]\n            {\n                handler.warn(\n                    \"Currently @swc/wasm does not support plugins, plugin transform will be \\\n                     skipped. Refer https://github.com/swc-project/swc/issues/3934 for the details.\",\n                );\n\n                Box::new(noop_pass())\n            }\n        };\n\n        #[cfg(not(feature = \"plugin\"))]\n        let plugin_transforms: Box<dyn Pass> = {\n            if experimental.plugins.is_some() {\n                handler.warn(\n                    \"Plugin is not supported with current @swc/core. Plugin transform will be \\\n                     skipped.\",\n                );\n            }\n            Box::new(noop_pass())\n        };\n\n        let mut plugin_transforms = Some(plugin_transforms);\n\n        let pass: Box<dyn Pass> = if experimental\n            .disable_builtin_transforms_for_internal_testing\n            .into_bool()\n        {\n            plugin_transforms.unwrap()\n        } else {\n            let jsx_enabled = syntax.jsx() && !jsx_preserve;\n\n            let decorator_pass: Box<dyn Pass> =","sourceCodeStart":851,"sourceCodeEnd":887,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc/src/config/mod.rs#L851-L887","documentation":"Emitted by the swc Rust crate when it was built without the `plugin` cargo feature but the supplied config contains jsc.experimental.plugins. SWC warns and uses a noop pass, so plugin transforms are skipped instead of failing the build.","triggerScenarios":"Depending on the swc crate with default-features=false (or a downstream binary that did not enable `plugin`) while passing Options whose experimental.plugins is Some; typically in custom Rust integrations or embedded compilers.","commonSituations":"Custom build pipelines that trim cargo features for compile time; distributions of swc built without the wasmtime-based plugin runtime; users surprised that plugins have no effect.","solutions":["Enable the feature: swc = { version = \"...\", features = [\"plugin\"] } (and matching swc_core plugin features) so plugins actually execute.","If you cannot enable it, remove plugins from the config to silence the warning and avoid shipping untransformed code.","Fail fast: assert at startup that plugins are supported when the config requests them."],"exampleFix":"# before\nswc = { version = \"14\", default-features = false }\n\n# after\nswc = { version = \"14\", default-features = false, features = [\"plugin\"] }","handlingStrategy":"validation","validationCode":"// At startup, fail fast if plugins are requested but not compiled in.\nfn check_plugin_feature(requested: bool) -> anyhow::Result<()> {\n    if requested && !cfg!(feature = \"plugin\") {\n        anyhow::bail!(\"this binary was built without the swc 'plugin' feature; rebuild with features = [\\\"plugin\\\"] or remove plugins from config\");\n    }\n    Ok(())\n}","typeGuard":"fn pluginsCompiledIn() -> bool {\n    cfg!(feature = \"plugin\")\n}","tryCatchPattern":null,"preventionTips":["When trimming default features in Cargo.toml, add a startup assert that rejects plugin configs.","Document required features in the binary's README so integrators enable 'plugin'.","Add a config lint step that errors on experimental.plugins when the feature is absent."],"tags":["cargo-feature","plugin","not-supported","config","rust"],"backgroundTag":"feature-flag-not-enabled","analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}