File tree 2 files changed +11
-2
lines changed
packages/kit/src/exports/vite
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 = {
105
105
if ( ! filename ) return ;
106
106
107
107
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 ) {
109
112
const message =
110
113
`\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' ;
112
116
113
117
if ( ! warned . has ( message ) ) {
114
118
console . log ( message ) ;
You can’t perform that action at this time.
0 commit comments