File tree 1 file changed +9
-2
lines changed
crates/swc_plugin_runner/src
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
use std:: { env, sync:: Arc } ;
2
2
3
- use anyhow:: { anyhow, Error } ;
3
+ use anyhow:: { anyhow, Context , Error } ;
4
4
use parking_lot:: Mutex ;
5
5
#[ cfg( feature = "__rkyv" ) ]
6
6
use swc_common:: plugin:: serialized:: { PluginError , PluginSerializedBytes } ;
@@ -389,6 +389,13 @@ impl TransformExecutor {
389
389
) -> Result < PluginSerializedBytes , Error > {
390
390
let mut transform_state = self . setup_plugin_env_exports ( ) ?;
391
391
transform_state. is_transform_schema_compatible ( ) ?;
392
- transform_state. run ( program, self . unresolved_mark , should_enable_comments_proxy)
392
+ transform_state
393
+ . run ( program, self . unresolved_mark , should_enable_comments_proxy)
394
+ . context (
395
+ "failed to run Wasm plugin transform. Please ensure the version of `swc_core` \
396
+ used by the plugin is compatible with the host runtime. See https://swc.rs/docs/plugin/selecting-swc-core\
397
+ for compatibility information. If you are an author of the plugin, please update \
398
+ `swc_core` to the compatible version.",
399
+ )
393
400
}
394
401
}
You can’t perform that action at this time.
0 commit comments