We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4858ea commit 86cdc10Copy full SHA for 86cdc10
rewriter/js/src/visitor.rs
@@ -184,7 +184,10 @@ where
184
}
185
186
fn visit_import_declaration(&mut self, it: &ImportDeclaration<'data>) {
187
- self.rewrite_url(&it.source,true);
+ let str = it.source.to_string();
188
+ if str.contains(":") || str.starts_with("/") || str.starts_with("./") || str.starts_with("../") {
189
+ self.rewrite_url(&it.source,true);
190
+ }
191
walk::walk_import_declaration(self, it);
192
193
fn visit_import_expression(&mut self, it: &ImportExpression<'data>) {
0 commit comments