From 77b09fa653294a6ecb13a88d4814f27fdaff0576 Mon Sep 17 00:00:00 2001 From: Jerko Steiner Date: Sat, 2 Nov 2019 13:58:55 -0400 Subject: [PATCH] Do not build esm while watching ESM modules are only important for tree shaking - when building the final production bundle --- packages/scripts/src/scripts/build.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/scripts/src/scripts/build.ts b/packages/scripts/src/scripts/build.ts index ec1fb71..f00a045 100644 --- a/packages/scripts/src/scripts/build.ts +++ b/packages/scripts/src/scripts/build.ts @@ -176,7 +176,7 @@ async function buildJs(path: string) { async function watchJs(path: string, hot = false, ...extraArgs: string[]) { const args = [ - join(path, 'esm', 'entrypoint.js'), + join(path, 'lib', 'entrypoint.js'), ] if (hot) { const hotArgs = [ @@ -252,9 +252,9 @@ export async function frontend(...argv: string[]) { if (args['full-paths']) { watchArgs.push('--full-paths') } - await build(argv[0], ...['--esm', path]) + await build(argv[0], ...[path]) const promises = [ - build(argv[0], ...['--esm', path, '--watch']), + build(argv[0], ...[path, '--watch']), watchJs(path, args.hot, ...watchArgs), watchCss(path), ]