You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mUsing assets with smart placement turned on may result in poor performance.[0m
4488
+
"[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mTurning on Smart Placement in a Worker that is using assets and serve_directlyset tofalse means that your entire Worker could be moved to run closer to your data source, and all requests will go to that Worker before serving assets.[0m
4485
4489
4486
-
"
4487
-
`);
4488
-
});
4490
+
This could result in poor performance as round trip times could increase when serving assets.
4489
4491
4490
-
it("should warn when using smart placement with assets-first",async()=>{
"[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mexperimental_serve_directly=false but no assets.binding provided.[0m
4532
+
"[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mAssets are not accessible, as the [assets.experimental_serve_directly] configuration key is set to \`false\`, but no [assets.binding] configuration is provided.[0m
4533
+
4534
+
❯❯ Add an assets binding to your assets configuration: binding = \\"ASSETS\\", or
4535
+
❯❯ Set experimental_serve_directly=false in your assets configuration
"[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mexperimental_serve_directly=false but no assets.binding provided.[0m
1723
+
"[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mAssets are not accessible, as the [assets.experimental_serve_directly] configuration key is set to \`false\`, but no [assets.binding] configuration is provided.[0m
1724
+
1725
+
❯❯ Add an assets binding to your assets configuration: binding = \\"ASSETS\\", or
1726
+
❯❯ Set experimental_serve_directly=false in your assets configuration
"Using assets with smart placement turned on may result in poor performance."
453
+
"Turning on Smart Placement in a Worker that is using assets and serve_directly set to false means that your entire Worker could be moved to run closer to your data source, and all requests will go to that Worker before serving assets.\n"+
454
+
"This could result in poor performance as round trip times could increase when serving assets.\n\n"+
@@ -463,7 +465,10 @@ export function validateAssetsArgsAndConfig(
463
465
!config?.assets?.binding
464
466
){
465
467
logger.warn(
466
-
"experimental_serve_directly=false but no assets.binding provided."
468
+
"Assets are not accessible, as the [assets.experimental_serve_directly] configuration key is set to `false`, but no [assets.binding] configuration is provided.\n"+
469
+
'❯❯ Add an assets binding to your assets configuration: binding = "ASSETS", or\n'+
470
+
"❯❯ Set experimental_serve_directly=false in your assets configuration\n\n"+
0 commit comments