chore(ci): [bot] format code

This commit is contained in:
github-actions[bot] 2025-08-04 02:42:39 +00:00
parent 233eb839d6
commit aa9070e2ab
4 changed files with 16 additions and 12 deletions

View File

@ -615,6 +615,7 @@ When you use legacy TypeScript decorator by enabling `emitDecoratorMetadata` in
decorators. In this case, you can give extra swc configuration in the `tsup.config.ts` file.
For example, if you have to define `useDefineForClassFields`, you can do that as follows:
```ts
import { defineConfig } from 'tsup'
@ -626,10 +627,10 @@ export default defineConfig({
swc: {
jsc: {
transform: {
useDefineForClassFields: true
}
}
}
useDefineForClassFields: true,
},
},
},
})
```
@ -648,9 +649,9 @@ Note: some SWC options cannot be configured:
"keepClassNames": true,
"target": "es2022"
}
```
```
You can also define a custom `.swcrc` configuration file. Just set `swcrc` to `true`
You can also define a custom `.swcrc` configuration file. Just set `swcrc` to `true`
in `tsup.config.ts` to allow SWC plugin to discover automatically your custom swc config file.
```ts
@ -662,8 +663,8 @@ export default defineConfig({
sourcemap: true,
clean: true,
swc: {
swcrc: true
}
swcrc: true,
},
})
```

View File

@ -9,7 +9,10 @@ import type { Logger } from '../log'
export type SwcPluginConfig = { logger: Logger } & Options
export const swcPlugin = ({ logger, ...swcOptions }: SwcPluginConfig): Plugin => {
export const swcPlugin = ({
logger,
...swcOptions
}: SwcPluginConfig): Plugin => {
return {
name: 'swc',

View File

@ -257,8 +257,8 @@ export type Options = {
* @default true
*/
removeNodeProtocol?: boolean
swc?: SwcPluginConfig;
swc?: SwcPluginConfig
}
export interface NormalizedExperimentalDtsConfig {

View File

@ -4,6 +4,6 @@ export default defineConfig({
test: {
testTimeout: 50000,
globalSetup: 'vitest-global.ts',
include: ["test/*.test.ts", "src/**/*.test.ts"]
include: ['test/*.test.ts', 'src/**/*.test.ts'],
},
})