diff --git a/scripts/build.js b/scripts/build.js index d89cee24616..a6d9ab6c94d 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -237,7 +237,7 @@ async function build(name, inputFile, outputPath, outputFile, isProd) { // Assets pipeline might use "export" word in the beginning of the line // as a dependency, avoiding it with empty comment in front const patchedSource = isWWW - ? source.replace(/^(export)/gm, '/**/$1') + ? source.replace(/^(export(?!s))/gm, '/**/$1') : source; return `${getComment()}\n${patchedSource}`; },