Reverted changes in core/build

This commit is contained in:
JuanM04 2022-03-29 23:06:06 -03:00
parent 0555099619
commit fc2dc973f2
No known key found for this signature in database
GPG key ID: 0171B712E406271A

View file

@ -26,7 +26,7 @@ export interface BuildOptions {
/** `astro build` */
export default async function build(config: AstroConfig, options: BuildOptions = { logging: defaultLogOptions }): Promise<void> {
config = await runHookConfigSetup({ config, command: 'build' });
applyPolyfill();
const builder = new AstroBuilder(config, options);
await builder.run();
}
@ -62,6 +62,7 @@ class AstroBuilder {
const { logging } = this;
this.timer.init = performance.now();
this.timer.viteStart = performance.now();
this.config = await runHookConfigSetup({ config: this.config, command: 'build' });
const viteConfig = await createVite(
{
mode: this.mode,