Merge pull request #7801 from Budibase/fix/datasource-hot-reloading

Datasource hot reloading fix
This commit is contained in:
Michael Drury 2022-09-16 13:19:39 +02:00 committed by GitHub
commit 91e1735ccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -412,6 +412,7 @@ exports.getDatasourcePlugin = async (name, url, hash) => {
return require(filename)
} else {
console.log(`Updating plugin: ${name}`)
delete require.cache[require.resolve(filename)]
fs.unlinkSync(filename)
}
}