]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(build): disable useDefineForClassFields in esbuild (#9252)
author三咲智子 Kevin Deng <sxzz@sxzz.moe>
Tue, 19 Sep 2023 15:13:39 +0000 (23:13 +0800)
committerGitHub <noreply@github.com>
Tue, 19 Sep 2023 15:13:39 +0000 (23:13 +0800)
rollup.config.js

index 7050ba437e6cf625ee81a5fd4ec8f2b98301d689..5898f1f9db9193af1273d20e52ef78bd473e56ef 100644 (file)
@@ -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