Browse Source

stop incorrectly transforming single quote imports

fix-single-quote-import
Benjamin Atkin 3 years ago
parent
commit
9ac1fff189
  1. 2
      builder.js

2
builder.js

@ -61,7 +61,7 @@ export class Builder {
return `// append: ${s}\n${match}`
}
).replaceAll(
/^\s*import\s+(\{[^}]+\})\s+from\s+("[^"]+"|')/gms,
/^\s*import\s+(\{[^}]+\})\s+from\s+("[^"]+")/gms,
(match, p1, p2) => {
const vars = p1.replaceAll(' as ', ': ')
const importPath = p2.slice(1, -1)

Loading…
Cancel
Save