Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslihotzki committed Sep 7, 2022
1 parent 405dce1 commit f0b166e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/cli-support/src/wit/mod.rs
Expand Up @@ -887,15 +887,17 @@ impl<'a> Context<'a> {
if let Some(vendor_prefixes) = vendor_prefixes {
assert!(vendor_prefixes.len() > 0);

if let Some(decode::ImportModule::Inline(_)) = &import.module {
if let Some(decode::ImportModule::Inline(_) | decode::ImportModule::Named(_)) =
&import.module
{
bail!(
"local JS snippets do not support vendor prefixes for \
the import of `{}` with a polyfill of `{}`",
item,
&vendor_prefixes[0]
);
}
if let Some(decode::ImportModule::Named(module)) = &import.module {
if let Some(decode::ImportModule::RawNamed(module)) = &import.module {
bail!(
"import of `{}` from `{}` has a polyfill of `{}` listed, but
vendor prefixes aren't supported when importing from modules",
Expand Down

0 comments on commit f0b166e

Please sign in to comment.