File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
packages/kit/src/exports/vite Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @sveltejs/kit " : patch
3+ ---
4+
5+ fix: adjust missing inner content warning
Original file line number Diff line number Diff line change @@ -105,10 +105,14 @@ const warning_preprocessor = {
105105 if ( ! filename ) return ;
106106
107107 const basename = path . basename ( filename ) ;
108- if ( basename . startsWith ( '+layout.' ) && ! content . includes ( '<slot' ) ) {
108+ const has_children =
109+ content . includes ( '<slot' ) || ( isSvelte5Plus ( ) && content . includes ( '{@render' ) ) ;
110+
111+ if ( basename . startsWith ( '+layout.' ) && ! has_children ) {
109112 const message =
110113 `\n${ colors . bold ( ) . red ( path . relative ( '.' , filename ) ) } \n` +
111- '`<slot />` missing — inner content will not be rendered' ;
114+ `\`<slot />\`${ isSvelte5Plus ( ) ? ' or `{@render ...}` tag' : '' } ` +
115+ ' missing — inner content will not be rendered' ;
112116
113117 if ( ! warned . has ( message ) ) {
114118 console . log ( message ) ;
You can’t perform that action at this time.
0 commit comments