@@ -10,6 +10,7 @@ import { generateStaticRoutingRuleMatcher } from "@cloudflare/workers-shared/ass
1010import replace from "@rollup/plugin-replace" ;
1111import MagicString from "magic-string" ;
1212import { Miniflare } from "miniflare" ;
13+ import colors from "picocolors" ;
1314import * as vite from "vite" ;
1415import {
1516 createModuleReference ,
@@ -449,13 +450,27 @@ if (import.meta.hot) {
449450 }
450451
451452 if ( hasDevContainers ) {
453+ viteDevServer . config . logger . info (
454+ colors . dim (
455+ colors . yellow (
456+ "∷ Building container images for local development...\n"
457+ )
458+ )
459+ ) ;
452460 containerImageTagsSeen = await prepareContainerImages ( {
453461 containersConfig : entryWorkerConfig . containers ,
454462 containerBuildId,
455463 isContainersEnabled : entryWorkerConfig . dev . enable_containers ,
456464 dockerPath,
457465 configPath : entryWorkerConfig . configPath ,
458466 } ) ;
467+ viteDevServer . config . logger . info (
468+ colors . dim (
469+ colors . yellow (
470+ "\n⚡️ Containers successfully built. To rebuild your containers during development, restart the Vite dev server (r + enter)."
471+ )
472+ )
473+ ) ;
459474
460475 // poll Docker every two seconds and update the list of ids of all
461476 // running containers
@@ -575,13 +590,23 @@ if (import.meta.hot) {
575590 if ( hasDevContainers ) {
576591 const dockerPath = getDockerPath ( ) ;
577592
593+ vitePreviewServer . config . logger . info (
594+ colors . dim (
595+ colors . yellow (
596+ "∷ Building container images for local preview...\n"
597+ )
598+ )
599+ ) ;
578600 containerImageTagsSeen = await prepareContainerImages ( {
579601 containersConfig : entryWorkerConfig . containers ,
580602 containerBuildId,
581603 isContainersEnabled : entryWorkerConfig . dev . enable_containers ,
582604 dockerPath,
583605 configPath : entryWorkerConfig . configPath ,
584606 } ) ;
607+ vitePreviewServer . config . logger . info (
608+ colors . dim ( colors . yellow ( "\n⚡️ Containers successfully built.\n" ) )
609+ ) ;
585610
586611 const dockerPollIntervalId = setInterval ( async ( ) => {
587612 if ( containerImageTagsSeen ?. size ) {
0 commit comments