mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-11 19:04:30 +00:00
use watchChange plugin hook to detect invalidations
This commit is contained in:
@@ -105,6 +105,13 @@ export class RollupCompiler {
|
||||
const mod: any = require(input);
|
||||
delete require.cache[input];
|
||||
|
||||
(mod.plugins || (mod.plugins = [])).push({
|
||||
name: 'sapper-internal',
|
||||
watchChange: (file: string) => {
|
||||
this._oninvalid(file);
|
||||
}
|
||||
});
|
||||
|
||||
return mod;
|
||||
}
|
||||
|
||||
@@ -147,8 +154,6 @@ export class RollupCompiler {
|
||||
|
||||
case 'BUNDLE_START':
|
||||
this._start = Date.now();
|
||||
// TODO figure out which file changed
|
||||
this._oninvalid('[TODO] unknown file');
|
||||
break;
|
||||
|
||||
case 'BUNDLE_END':
|
||||
|
||||
Reference in New Issue
Block a user