mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 03:25:24 +00:00
replace client_assets.json with build.json, include bundler name
This commit is contained in:
@@ -64,7 +64,10 @@ async function execute(emitter: EventEmitter, {
|
||||
result: client_result
|
||||
});
|
||||
|
||||
fs.writeFileSync(path.join(dest, 'client_assets.json'), JSON.stringify(client_result.assetsByChunkName));
|
||||
fs.writeFileSync(path.join(dest, 'build.json'), JSON.stringify({
|
||||
bundler,
|
||||
assets: client_result.assetsByChunkName
|
||||
}));
|
||||
|
||||
const server_stats = await server.compile();
|
||||
emitter.emit('build', <events.BuildEvent>{
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user