packages/cli: use bundle instead of react-scripts for app:start
This commit is contained in:
@@ -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(() => {});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user