-
Notifications
You must be signed in to change notification settings - Fork 8
Option to rerun provider fonction every rebuild #9
Copy link
Copy link
Open
Description
{
//...
watch: {
input: [
// ...
'./src/fileToInject.txt',
],
},
plugins: [
// ...
replace({
replaces: {
__PLACEHOLDER__: (data) => {
return fs.readFileSync('./src/fileToInject.txt', 'utf-8')
},
}
})
],
}Expected result:
Everytime I modify fileToInject.txt, I would like my bundle to be updated with the latest content.
Current result:
Currently the function is evaluated only once at the first build. When the watcher detects a change, the bundle is rebuilt, but the replace plugin reuses the last value returned by the function. Therefore my bundle is not updated.
Solution:
Provide a evaluateEveryTime or such option.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels