packages/cli: use bundle instead of react-scripts for app:start

This commit is contained in:
Patrik Oldsberg
2020-05-16 17:50:32 +02:00
parent afae83ba8d
commit 5cb37b504a
+4 -13
View File
@@ -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(() => {});
};