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 3f337c5 commit c59a222Copy full SHA for c59a222
packages/vite/src/node/plugins/esbuild.ts
@@ -29,7 +29,7 @@ const debug = createDebugger('vite:esbuild')
29
// IIFE content looks like `var MyLib = function() {`.
30
// Spaces are removed and parameters are mangled when minified
31
const IIFE_BEGIN_RE =
32
- /(?:const|var)\s+\S+\s*=\s*function\([^()]*\)\s*\{\s*"use strict";/
+ /(?:const|var)\s+\S+\s*=\s*\(?function\([^()]*\)\s*\{\s*"use strict";/
33
34
const validExtensionRE = /\.\w+$/
35
const jsxExtensionsRE = /\.(?:j|t)sx\b/
0 commit comments