fix(local plugin): remove folder before copying

This commit is contained in:
Guillaume Chau
2018-10-28 18:45:24 +01:00
parent b0f6ed8218
commit 7d2d1fb732

View File

@@ -492,6 +492,7 @@ function update (id, context) {
async function updateLocalPackage ({ id, cwd, localPath }, context) {
const from = path.resolve(cwd, localPath)
const to = path.resolve(cwd, 'node_modules', ...id.split('/'))
await fs.remove(to)
await fs.copy(from, to)
}