From 67b4d4f107f0b4e4eec462114b6aff802bbf58c7 Mon Sep 17 00:00:00 2001 From: zhouyun1 Date: Mon, 12 Dec 2022 14:54:34 +0800 Subject: [PATCH] fix: #68 --- src/components/copy/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/copy/utils.ts b/src/components/copy/utils.ts index 3fe84c0..425a22f 100644 --- a/src/components/copy/utils.ts +++ b/src/components/copy/utils.ts @@ -4,7 +4,7 @@ import { saveAs } from 'file-saver' import Zip from 'jszip' const SPLIT_REGEXP = /\n|\n\s/ -const IMPORT_REGEXP = /^\s*import\s/ +const IMPORT_REGEXP = /^\s*@?import\s/ const IMPORT_FROM_PATH_REGEXP = /import\s.+\sfrom\s["'](.*)["']/ const IMPORT_PATH_REGEXP = /import\s["'](.*)["']/ const EXT_REGEXP = /\w+\.\w+$/