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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add decoratorMetadata flag if enabled by tsconfig #32914

Merged
merged 12 commits into from Feb 6, 2022
4 changes: 4 additions & 0 deletions packages/next/build/swc/options.js
Expand Up @@ -20,6 +20,9 @@ function getBaseSWCOptions({
const enableDecorators = Boolean(
jsConfig?.compilerOptions?.experimentalDecorators
)
const emitDecoratorMetadata = Boolean(
jsConfig?.compilerOptions?.emitDecoratorMetadata
)
return {
jsc: {
...(resolvedBaseUrl && paths
Expand All @@ -38,6 +41,7 @@ function getBaseSWCOptions({

transform: {
legacyDecorator: enableDecorators,
decoratorMetadata: emitDecoratorMetadata,
react: {
importSource: jsConfig?.compilerOptions?.jsxImportSource || 'react',
runtime: 'automatic',
Expand Down