From 392ca5706d292ecc4d56897bb39f14063112922a Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 26 Jul 2022 18:28:06 +0200 Subject: [PATCH] More forgiving import regex --- examples/webpack/example-builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/webpack/example-builder.js b/examples/webpack/example-builder.js index 5b2df9b9e7..700dd7c748 100644 --- a/examples/webpack/example-builder.js +++ b/examples/webpack/example-builder.js @@ -13,7 +13,7 @@ const baseDir = dirname(fileURLToPath(import.meta.url)); const isCssRegEx = /\.css(\?.*)?$/; const isJsRegEx = /\.js(\?.*)?$/; -const importRegEx = /(?:^|\n)import .* from '(.*)';(?:\n|$)/g; +const importRegEx = /\simport .* from '([^']+)';\s/g; const isTemplateJs = /\/(jquery(-\d+\.\d+\.\d+)?|(bootstrap(\.bundle)?))(\.min)?\.js(\?.*)?$/; const isTemplateCss = /\/bootstrap(\.min)?\.css(\?.*)?$/;