Skip to content

Commit

Permalink
Fix serverless#272: symlink deps are not included in the build
Browse files Browse the repository at this point in the history
  • Loading branch information
malfianrasyidin committed May 3, 2023
1 parent 256540c commit cc33b94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class TypeScriptPlugin {
}

if (!fs.existsSync(destFileName)) {
fs.copySync(path.resolve(filename), path.resolve(path.join(BUILD_FOLDER, filename)))
fs.copySync(path.resolve(filename), path.resolve(path.join(BUILD_FOLDER, filename)), { dereference: true })
}
}
}
Expand All @@ -233,7 +233,8 @@ export class TypeScriptPlugin {

fs.copySync(
path.resolve('node_modules'),
path.resolve(path.join(BUILD_FOLDER, 'node_modules'))
path.resolve(path.join(BUILD_FOLDER, 'node_modules')),
{ dereference: true }
)
} else {
if (!fs.existsSync(outModulesPath)) {
Expand Down

0 comments on commit cc33b94

Please sign in to comment.