Skip to content

Commit a794044

Browse files
authored
add experimental swcPlugins next.config.js option
1 parent 19cee08 commit a794044

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/next/build/swc/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function getBaseSWCOptions({
5454
parser: parserConfig,
5555
experimental: {
5656
keepImportAssertions: true,
57+
plugins: nextConfig.experimental.swcPlugins
5758
},
5859
transform: {
5960
// Enables https://github.com/swc-project/swc/blob/0359deb4841be743d73db4536d4a22ac797d7f65/crates/swc_ecma_ext_transforms/src/jest.rs

packages/next/server/config-shared.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export interface ExperimentalConfig {
8686
disablePostcssPresetEnv?: boolean
8787
swcMinify?: boolean
8888
swcFileReading?: boolean
89+
swcPlugins?: Array<[string, Record<string, any>]>
8990
cpus?: number
9091
sharedPool?: boolean
9192
plugins?: boolean

0 commit comments

Comments
 (0)