File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ async function build() {
5757 args . push ( "--no-default-features" ) ;
5858 args . push ( "--features plugin" ) ;
5959 }
60+ args . push ( "--no-dts-cache" ) ;
6061
6162 console . log ( `Run command: napi ${ args . join ( ' ' ) } ` ) ;
6263
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ license = "MIT"
55name = " rspack_binding_values"
66repository = " https://github.com/web-infra-dev/rspack"
77version = " 0.2.0"
8-
8+ [lib ]
9+ crate-type = [" cdylib" , " rlib" ]
910[features ]
1011plugin = [" rspack_loader_swc/plugin" ]
1112
@@ -87,3 +88,6 @@ rspack_plugin_wasm = { workspace = true }
8788rspack_plugin_web_worker_template = { workspace = true }
8889rspack_plugin_worker = { workspace = true }
8990rspack_tracing = { workspace = true }
91+
92+ [build-dependencies ]
93+ napi-build = { workspace = true }
Original file line number Diff line number Diff line change 1+ fn main ( ) {
2+ napi_build:: setup ( ) ;
3+
4+ // Rebuild binding options if and only if it's built for crate `node_binding`
5+ if std:: env:: var ( "OUT_DIR" )
6+ . expect ( "should exist" )
7+ . contains ( "node_binding" )
8+ {
9+ println ! ( "cargo:rerun-if-changed=../node_binding" ) ;
10+ }
11+ }
You can’t perform that action at this time.
0 commit comments