File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -1982,7 +1982,8 @@ impl<'a> Context<'a> {
1982
1982
if !self . config . mode . nodejs ( ) && !self . config . mode . bundler ( ) {
1983
1983
bail ! (
1984
1984
"NPM dependencies have been specified in `{}` but \
1985
- this is only compatible with the `bundler` and `nodejs` targets"
1985
+ this is only compatible with the `bundler` and `nodejs` targets",
1986
+ path. display( ) ,
1986
1987
) ;
1987
1988
}
1988
1989
Original file line number Diff line number Diff line change @@ -22,10 +22,15 @@ fn no_modules_rejects_npm() {
22
22
. file ( "package.json" , "" )
23
23
. wasm_bindgen ( "--no-modules" ) ;
24
24
cmd. assert ( )
25
- . stderr ( "\
26
- error: failed to generate bindings for JS import `foo`
27
- caused by: import from `foo` module not allowed with `--target no-modules`; use `nodejs`, `web`, or `bundler` target instead
28
- " )
25
+ . stderr (
26
+ str:: is_match (
27
+ "\
28
+ error: NPM dependencies have been specified in `.*` but this is only \
29
+ compatible with the `bundler` and `nodejs` targets
30
+ " ,
31
+ )
32
+ . unwrap ( ) ,
33
+ )
29
34
. failure ( ) ;
30
35
}
31
36
You can’t perform that action at this time.
0 commit comments