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(() => {}); };