Skip to content

Commit

Permalink
No longer error for npm dependencies with web (#2103)
Browse files Browse the repository at this point in the history
* No longer error for npm dependencies with web

* Fixing build error
  • Loading branch information
Pauan authored Apr 27, 2020
1 parent a479241 commit 541e8f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/cli-support/src/js/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3013,10 +3013,10 @@ impl<'a> Context<'a> {
}

fn process_package_json(&mut self, path: &Path) -> Result<(), Error> {
if !self.config.mode.nodejs() && !self.config.mode.bundler() {
if self.config.mode.no_modules() {
bail!(
"NPM dependencies have been specified in `{}` but \
this is only compatible with the `bundler` and `nodejs` targets",
this is incompatible with the `no-modules` target",
path.display(),
);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/tests/wasm-bindgen/npm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ fn no_modules_rejects_npm() {
.stderr(
str::is_match(
"\
error: NPM dependencies have been specified in `.*` but this is only \
compatible with the `bundler` and `nodejs` targets
error: NPM dependencies have been specified in `.*` but \
this is incompatible with the `no-modules` target
",
)
.unwrap(),
Expand Down

0 comments on commit 541e8f5

Please sign in to comment.