Skip to content

Commit

Permalink
Revert "fix: adjust missing inner content warning with svelte v5" (#1…
Browse files Browse the repository at this point in the history
…1387)

This reverts commit 787b739.
  • Loading branch information
Rich-Harris authored Dec 18, 2023
1 parent 9eae31f commit 6525f68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .changeset/brave-waves-accept.md

This file was deleted.

8 changes: 2 additions & 6 deletions packages/kit/src/exports/vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,10 @@ const warning_preprocessor = {
if (!filename) return;

const basename = path.basename(filename);
if (
basename.startsWith('+layout.') &&
!content.includes(isSvelte5Plus() ? '{@render children(' : '<slot')
) {
if (basename.startsWith('+layout.') && !content.includes('<slot')) {
const message =
`\n${colors.bold().red(path.relative('.', filename))}\n` +
`\`${isSvelte5Plus() ? '{@render children()' : '<slot />'}\`` +
' missing — inner content will not be rendered';
'`<slot />` missing — inner content will not be rendered';

if (!warned.has(message)) {
console.log(message);
Expand Down

0 comments on commit 6525f68

Please sign in to comment.