Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable useDefineForClassFields in esbuild #9252

Merged
merged 1 commit into from Sep 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion rollup.config.js
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