diff --git a/src/index.ts b/src/index.ts index 90f95a2e..eb1db8ff 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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 }) } } } @@ -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)) {