|
| 1 | +diff --git a/dist/build/swc/options.js b/dist/build/swc/options.js |
| 2 | +index 8da2935..8e04947 100644 |
| 3 | +--- a/dist/build/swc/options.js |
| 4 | ++++ b/dist/build/swc/options.js |
| 5 | +@@ -57,7 +57,7 @@ function getParserOptions({ filename, jsConfig, ...rest }) { |
| 6 | + ...rest, |
| 7 | + syntax: hasTsSyntax ? 'typescript' : 'ecmascript', |
| 8 | + dynamicImport: true, |
| 9 | +- decorators: enableDecorators, |
| 10 | ++ decorators: true, |
| 11 | + // Exclude regular TypeScript files from React transformation to prevent e.g. generic parameters and angle-bracket type assertion from being interpreted as JSX tags. |
| 12 | + [hasTsSyntax ? 'tsx' : 'jsx']: !isTSFile, |
| 13 | + importAssertions: true |
| 14 | +@@ -102,6 +102,7 @@ function getBaseSWCOptions({ filename, jest, development, hasReactRefresh, globa |
| 15 | + } : {}, |
| 16 | + legacyDecorator: enableDecorators, |
| 17 | + decoratorMetadata: emitDecoratorMetadata, |
| 18 | ++ decoratorVersion: "2022-03", |
| 19 | + useDefineForClassFields: useDefineForClassFields, |
| 20 | + react: { |
| 21 | + importSource: (jsConfig == null ? void 0 : (_jsConfig_compilerOptions4 = jsConfig.compilerOptions) == null ? void 0 : _jsConfig_compilerOptions4.jsxImportSource) ?? ((compilerOptions == null ? void 0 : compilerOptions.emotion) && !isReactServerLayer ? '@emotion/react' : 'react'), |
| 22 | +diff --git a/dist/esm/build/swc/options.js b/dist/esm/build/swc/options.js |
| 23 | +index 6d5922e..fb9b44a 100644 |
| 24 | +--- a/dist/esm/build/swc/options.js |
| 25 | ++++ b/dist/esm/build/swc/options.js |
| 26 | +@@ -26,7 +26,7 @@ export function getParserOptions({ filename, jsConfig, ...rest }) { |
| 27 | + ...rest, |
| 28 | + syntax: hasTsSyntax ? 'typescript' : 'ecmascript', |
| 29 | + dynamicImport: true, |
| 30 | +- decorators: enableDecorators, |
| 31 | ++ decorators: true, |
| 32 | + // Exclude regular TypeScript files from React transformation to prevent e.g. generic parameters and angle-bracket type assertion from being interpreted as JSX tags. |
| 33 | + [hasTsSyntax ? 'tsx' : 'jsx']: !isTSFile, |
| 34 | + importAssertions: true |
| 35 | +@@ -71,6 +71,7 @@ function getBaseSWCOptions({ filename, jest, development, hasReactRefresh, globa |
| 36 | + } : {}, |
| 37 | + legacyDecorator: enableDecorators, |
| 38 | + decoratorMetadata: emitDecoratorMetadata, |
| 39 | ++ decoratorVersion: "2022-03", |
| 40 | + useDefineForClassFields: useDefineForClassFields, |
| 41 | + react: { |
| 42 | + importSource: (jsConfig == null ? void 0 : (_jsConfig_compilerOptions4 = jsConfig.compilerOptions) == null ? void 0 : _jsConfig_compilerOptions4.jsxImportSource) ?? ((compilerOptions == null ? void 0 : compilerOptions.emotion) && !isReactServerLayer ? '@emotion/react' : 'react'), |
0 commit comments