From 5cb37b504a08551a924c54ac2ba2dabc0c04dca5 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 17:50:32 +0200 Subject: [PATCH] packages/cli: use bundle instead of react-scripts for app:start --- packages/cli/src/commands/app/serve.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/cli/src/commands/app/serve.ts b/packages/cli/src/commands/app/serve.ts index 1d0ccfc465..7215c71b04 100644 --- a/packages/cli/src/commands/app/serve.ts +++ b/packages/cli/src/commands/app/serve.ts @@ -14,20 +14,11 @@ * limitations under the License. */ -import { run } from '../../lib/run'; -import { createLogFunc } from '../../lib/logging'; -import { watchDeps } from '../../lib/watchDeps'; +import { startDevServer } from '../../lib/bundle'; export default async () => { - // Start dynamic watch and build of dependencies, then serve the app - await watchDeps({ build: true }); + await startDevServer({ entry: 'src/index' }); - await run('react-scripts', ['start'], { - env: { - EXTEND_ESLINT: 'true', - SKIP_PREFLIGHT_CHECK: 'true', - }, - // We need to avoid clearing the terminal, or the build feedback of dependencies will be lost - stdoutLogFunc: createLogFunc(process.stdout), - }); + // Wait for interrupt signal + await new Promise(() => {}); };