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 14af6cb commit 11156f9Copy full SHA for 11156f9
cli/convertToMDX.ts
@@ -46,8 +46,8 @@ function removeNoLiveTags(content: string): string {
46
}
47
48
function removeExistingImports(content: string): string {
49
- // Remove imports that don't end in .css
50
- const importRegex = /^import {?[\w\s,\n]*}? from ['"](?!.*\.css['"])[^'"]*['"];?\n/gm
+ // Remove imports that are absolute and not CSS
+ const importRegex = /^import {?[\w\s,\n]*}? from ['"](?!\.\.?\/)(?!.*\.css['"])[^'"]*['"];?\n/gm
51
return content.replace(importRegex, '')
52
53
0 commit comments