mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +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;
|
||||
|
||||
const strapiInstance = await strapi.load();
|
||||
|
||||
if (watchAdmin) {
|
||||
timer.start('createBuildContext');
|
||||
const contextSpinner = logger.spinner(`Building build context`).start();
|
||||
@ -213,8 +215,6 @@ const develop = async ({
|
||||
adminSpinner.succeed();
|
||||
}
|
||||
|
||||
const strapiInstance = await strapi.load();
|
||||
|
||||
const loadStrapiDuration = timer.end('loadStrapi');
|
||||
loadStrapiSpinner.text = `Loading Strapi (${prettyTime(loadStrapiDuration)})`;
|
||||
loadStrapiSpinner.succeed();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user