diff --git a/packages/vite-plugin-remdx/index.ts b/packages/vite-plugin-remdx/index.ts index 80928d1..f02574a 100644 --- a/packages/vite-plugin-remdx/index.ts +++ b/packages/vite-plugin-remdx/index.ts @@ -10,7 +10,7 @@ import ColorReplacements from './lib/ColorReplacements.tsx'; type Slide = [string, Record]; const EXPORT_DEFAULT_REGEXP = /export\sdefault\s/g; -const MODULE_REGEXP = /\\`|`(?:\\`|[^`])*`|(^(?:import|export).*$)/gm; +const MODULE_REGEXP = /\\`|`(?:\\`|[^`])*`|(^(?:import|export)[^;]+;)/gm; const compileMDX = async ( content: string,