Skip to content

Commit

Permalink
fix(build): disable useDefineForClassFields in esbuild (#9252)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz authored Sep 19, 2023
1 parent cd3ac99 commit 6d14fa8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6d14fa8

Please sign in to comment.