Browse Source
fix(build): disable useDefineForClassFields in esbuild (#9252)
pull/9238/head
三咲智子 Kevin Deng
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
1 deletions
-
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 |
|
|
|