mirror of https://github.com/vuejs/core.git
fix(build): disable useDefineForClassFields in esbuild (#9252)
This commit is contained in:
parent
cd3ac9996b
commit
6d14fa88e8
|
@ -273,6 +273,13 @@ function createConfig(format, output, plugins = []) {
|
||||||
return nodePlugins
|
return nodePlugins
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @satisfies {import('esbuild').TsconfigRaw} */
|
||||||
|
const tsconfigRaw = {
|
||||||
|
compilerOptions: {
|
||||||
|
useDefineForClassFields: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
input: resolve(entryFile),
|
input: resolve(entryFile),
|
||||||
// Global and Browser ESM builds inlines everything so that they can be
|
// Global and Browser ESM builds inlines everything so that they can be
|
||||||
|
@ -292,7 +299,9 @@ function createConfig(format, output, plugins = []) {
|
||||||
sourceMap: output.sourcemap,
|
sourceMap: output.sourcemap,
|
||||||
minify: false,
|
minify: false,
|
||||||
target: isServerRenderer || isNodeBuild ? 'es2019' : 'es2015',
|
target: isServerRenderer || isNodeBuild ? 'es2019' : 'es2015',
|
||||||
define: resolveDefine()
|
define: resolveDefine(),
|
||||||
|
// @ts-expect-error
|
||||||
|
tsconfigRaw
|
||||||
}),
|
}),
|
||||||
...resolveNodePlugins(),
|
...resolveNodePlugins(),
|
||||||
...plugins
|
...plugins
|
||||||
|
|
Loading…
Reference in New Issue