Merge pull request #7801 from Budibase/fix/datasource-hot-reloading
Datasource hot reloading fix
This commit is contained in:
commit
8451a0aec9
|
@ -412,6 +412,7 @@ exports.getDatasourcePlugin = async (name, url, hash) => {
|
||||||
return require(filename)
|
return require(filename)
|
||||||
} else {
|
} else {
|
||||||
console.log(`Updating plugin: ${name}`)
|
console.log(`Updating plugin: ${name}`)
|
||||||
|
delete require.cache[require.resolve(filename)]
|
||||||
fs.unlinkSync(filename)
|
fs.unlinkSync(filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue