Skip to content

Commit b8f12d6

Browse files
committed
fix(pencil): Add third parameter to fs.symlinkSync
Closes #130, #23, #100, #103, #121. New PR to be opened for resolution of further issues with Windows symlink failures.
1 parent caf50c0 commit b8f12d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ export class TypeScriptPlugin {
138138
async copyExtras() {
139139
// include node_modules into build
140140
if (!fs.existsSync(path.resolve(path.join(buildFolder, 'node_modules')))) {
141-
fs.symlinkSync(path.resolve('node_modules'), path.resolve(path.join(buildFolder, 'node_modules')))
141+
fs.symlinkSync(path.resolve('node_modules'), path.resolve(path.join(buildFolder, 'node_modules')), 'junction')
142142
}
143143

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

149149
// include any "extras" from the "include" section

0 commit comments

Comments
 (0)