We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 424fe49 commit a8ad4acCopy full SHA for a8ad4ac
src/index.ts
@@ -195,10 +195,14 @@ export class TypeScriptPlugin {
195
fs.unlinkSync(outModulesPath)
196
}
197
198
- fs.copySync(
199
- path.resolve('node_modules'),
200
- path.resolve(path.join(BUILD_FOLDER, 'node_modules'))
201
- )
+ if (fs.existsSync(path.resolve('node_modules'))) {
+ fs.copySync(
+ path.resolve('node_modules'),
+ outModulesPath
202
+ )
203
+ } else {
204
+ fs.mkdirSync(outModulesPath)
205
+ }
206
} else {
207
if (!fs.existsSync(outModulesPath)) {
208
await this.linkOrCopy(path.resolve('node_modules'), outModulesPath, 'junction')
0 commit comments