From c2c78765596b1b60f24e66861a1dcee97ea07f90 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 22 Sep 2023 21:08:34 +0800 Subject: [PATCH] fix: use utf-16 in `builtin:swc-loader` --- crates/node_binding/src/loader.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/node_binding/src/loader.rs b/crates/node_binding/src/loader.rs index 8e23fbf90243..14ad2a80fa46 100644 --- a/crates/node_binding/src/loader.rs +++ b/crates/node_binding/src/loader.rs @@ -1,4 +1,4 @@ -use napi::Result; +use napi::{bindgen_prelude::*, Result}; use rspack_binding_options::{run_builtin_loader as run_builtin, JsLoaderContext}; /// Builtin loader runner @@ -6,8 +6,8 @@ use rspack_binding_options::{run_builtin_loader as run_builtin, JsLoaderContext} #[allow(unused)] pub async fn run_builtin_loader( builtin: String, - options: Option<&str>, + options: Option, loader_context: JsLoaderContext, ) -> Result { - run_builtin(builtin, options, loader_context).await + run_builtin(builtin, options.as_deref(), loader_context).await }