replace client_assets.json with build.json, include bundler name

This commit is contained in:
Rich Harris
2018-08-28 17:56:46 -04:00
parent 19a5dcad1d
commit 70b5cc86dc
6 changed files with 28 additions and 18 deletions

View File

@@ -271,7 +271,10 @@ class Watcher extends EventEmitter {
},
handle_result: (result: CompileResult) => {
fs.writeFileSync(path.join(dest, 'client_assets.json'), JSON.stringify(result.assetsByChunkName, null, ' '));
fs.writeFileSync(path.join(dest, 'build.json'), JSON.stringify({
bundler: this.bundler,
assets: result.assetsByChunkName
}, null, ' '));
this.deferreds.client.fulfil();
const client_files = result.assets.map((file: string) => `client/${file}`);