Skip to content

Commit

Permalink
feat(cli): ignore node_modules in glob to drastically increase perfor…
Browse files Browse the repository at this point in the history
…mance in Node environments (#13305)
  • Loading branch information
ErlendHer committed Oct 17, 2023
1 parent 30df5f8 commit 5cc1b55
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -27,7 +27,7 @@ const uploadStudioBackendFiles = async (s3: S3, bucketName: string) => {
'transform.conf.json',
'parameters.json',
]
.flatMap((baseName) => glob.sync(`**/${baseName}`, { cwd: amplifyDirPath }))
.flatMap((baseName) => glob.sync(`**/${baseName}`, { cwd: amplifyDirPath, ignore: ['**/node_modules/**'] }))
.filter((filePath) => !filePath.startsWith('backend'))
.map((filePath) => ({
Body: fs.createReadStream(path.join(amplifyDirPath, filePath)),
Expand Down

0 comments on commit 5cc1b55

Please sign in to comment.