Skip to content

Commit

Permalink
fix(pencil): Add third parameter to fs.symlinkSync
Browse files Browse the repository at this point in the history
Closes #130, #23, #89, #100, #103. New PR to be opened for resolution of
further issues with Windows symlink failures.
  • Loading branch information
JackCuthbert committed Apr 6, 2019
1 parent caf50c0 commit e0af7df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ export class TypeScriptPlugin {
async copyExtras() {
// include node_modules into build
if (!fs.existsSync(path.resolve(path.join(buildFolder, 'node_modules')))) {
fs.symlinkSync(path.resolve('node_modules'), path.resolve(path.join(buildFolder, 'node_modules')))
fs.symlinkSync(path.resolve('node_modules'), path.resolve(path.join(buildFolder, 'node_modules')), 'junction')
}

// include package.json into build so Serverless can exlcude devDeps during packaging
if (!fs.existsSync(path.resolve(path.join(buildFolder, 'package.json')))) {
fs.symlinkSync(path.resolve('package.json'), path.resolve(path.join(buildFolder, 'package.json')))
fs.symlinkSync(path.resolve('package.json'), path.resolve(path.join(buildFolder, 'package.json')), 'file')
}

// include any "extras" from the "include" section
Expand Down

0 comments on commit e0af7df

Please sign in to comment.