mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 03:17:11 +00:00
fix: load strapi before watch
This commit is contained in:
parent
20afc21f5d
commit
73ff3d9f3b
@ -179,6 +179,8 @@ const develop = async ({
|
|||||||
*/
|
*/
|
||||||
let bundleWatcher: WebpackWatcher | ViteWatcher | undefined;
|
let bundleWatcher: WebpackWatcher | ViteWatcher | undefined;
|
||||||
|
|
||||||
|
const strapiInstance = await strapi.load();
|
||||||
|
|
||||||
if (watchAdmin) {
|
if (watchAdmin) {
|
||||||
timer.start('createBuildContext');
|
timer.start('createBuildContext');
|
||||||
const contextSpinner = logger.spinner(`Building build context`).start();
|
const contextSpinner = logger.spinner(`Building build context`).start();
|
||||||
@ -213,8 +215,6 @@ const develop = async ({
|
|||||||
adminSpinner.succeed();
|
adminSpinner.succeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
const strapiInstance = await strapi.load();
|
|
||||||
|
|
||||||
const loadStrapiDuration = timer.end('loadStrapi');
|
const loadStrapiDuration = timer.end('loadStrapi');
|
||||||
loadStrapiSpinner.text = `Loading Strapi (${prettyTime(loadStrapiDuration)})`;
|
loadStrapiSpinner.text = `Loading Strapi (${prettyTime(loadStrapiDuration)})`;
|
||||||
loadStrapiSpinner.succeed();
|
loadStrapiSpinner.succeed();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user