mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-13 06:44:13 +03:00
No longer error for npm dependencies with web (#2103)
* No longer error for npm dependencies with web * Fixing build error
This commit is contained in:
parent
a479241c46
commit
541e8f5359
@ -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(),
|
||||
);
|
||||
}
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user