From: 三咲智子 Kevin Deng Date: Tue, 19 Sep 2023 15:13:39 +0000 (+0800) Subject: fix(build): disable useDefineForClassFields in esbuild (#9252) X-Git-Tag: v3.3.5~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d14fa88e85d4c9e264be394ddb37a54ca6738a8;p=thirdparty%2Fvuejs%2Fcore.git fix(build): disable useDefineForClassFields in esbuild (#9252) --- diff --git a/rollup.config.js b/rollup.config.js index 7050ba437e..5898f1f9db 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -273,6 +273,13 @@ function createConfig(format, output, plugins = []) { return nodePlugins } + /** @satisfies {import('esbuild').TsconfigRaw} */ + const tsconfigRaw = { + compilerOptions: { + useDefineForClassFields: false + } + } + return { input: resolve(entryFile), // Global and Browser ESM builds inlines everything so that they can be @@ -292,7 +299,9 @@ function createConfig(format, output, plugins = []) { sourceMap: output.sourcemap, minify: false, target: isServerRenderer || isNodeBuild ? 'es2019' : 'es2015', - define: resolveDefine() + define: resolveDefine(), + // @ts-expect-error + tsconfigRaw }), ...resolveNodePlugins(), ...plugins