Skip to content

Commit 541e8f5

Browse files
authored
No longer error for npm dependencies with web (#2103)
* No longer error for npm dependencies with web * Fixing build error
1 parent a479241 commit 541e8f5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/cli-support/src/js/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,10 +3013,10 @@ impl<'a> Context<'a> {
30133013
}
30143014

30153015
fn process_package_json(&mut self, path: &Path) -> Result<(), Error> {
3016-
if !self.config.mode.nodejs() && !self.config.mode.bundler() {
3016+
if self.config.mode.no_modules() {
30173017
bail!(
30183018
"NPM dependencies have been specified in `{}` but \
3019-
this is only compatible with the `bundler` and `nodejs` targets",
3019+
this is incompatible with the `no-modules` target",
30203020
path.display(),
30213021
);
30223022
}

crates/cli/tests/wasm-bindgen/npm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ fn no_modules_rejects_npm() {
2525
.stderr(
2626
str::is_match(
2727
"\
28-
error: NPM dependencies have been specified in `.*` but this is only \
29-
compatible with the `bundler` and `nodejs` targets
28+
error: NPM dependencies have been specified in `.*` but \
29+
this is incompatible with the `no-modules` target
3030
",
3131
)
3232
.unwrap(),

0 commit comments

Comments
 (0)