Skip to content

Commit 9f09912

Browse files
committed
fix: remove swc binaries
1 parent 95e225f commit 9f09912

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@ See https://ntl.fyi/remove-plugin for instructions.
125125
publishDir: netlifyConfig.build.publish || PUBLISH_DIR,
126126
nextRoot,
127127
})
128+
129+
if (!netlifyConfig.functions['*'].included_files) {
130+
// eslint-disable-next-line no-param-reassign
131+
netlifyConfig.functions['*'].included_files = []
132+
}
133+
netlifyConfig.functions['*'].included_files.push(
134+
'!node_modules/@next/swc-*/**/*',
135+
'!node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/**/*',
136+
)
128137
},
129138

130139
async onPostBuild({ netlifyConfig, packageJson, constants: { FUNCTIONS_DIST = DEFAULT_FUNCTIONS_DIST }, utils }) {

0 commit comments

Comments
 (0)