Skip to content

Commit

Permalink
chore: remove js files from prerendered/dependencies glob
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Dec 31, 2024
1 parent 488aa8c commit a7c0605
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ function createManifestTransform(
let url = e.url
// client assets in `.svelte-kit/output/client` folder.
// SSG pages in `.svelte-kit/output/prerendered/pages` folder.
// SPA pages in `.svelte-kit/output/prerendered/dependencies/` folder.
// static adapter with load functions in `.svelte-kit/output/prerendered/dependencies/<page>/_data.json`.
// static adapter with load functions in `.svelte-kit/output/prerendered/dependencies/<page>/__data.json`.
// fallback page in `.svelte-kit/output/prerendered` folder (fallback.html is the default).
if (url.startsWith('client/'))
url = url.slice(7)
Expand Down Expand Up @@ -188,7 +187,7 @@ function createManifestTransform(
function buildGlobPatterns(globPatterns?: string[]) {
if (globPatterns) {
if (!globPatterns.some(g => g.startsWith('prerendered/')))
globPatterns.push('prerendered/**/*.{html,json,js}')
globPatterns.push('prerendered/**/*.{html,json}')

if (!globPatterns.some(g => g.startsWith('client/')))
globPatterns.push('client/**/*.{js,css,ico,png,svg,webp,webmanifest}')
Expand All @@ -199,7 +198,7 @@ function buildGlobPatterns(globPatterns?: string[]) {
return globPatterns
}

return ['client/**/*.{js,css,ico,png,svg,webp,webmanifest}', 'prerendered/**/*.{html,json,js}']
return ['client/**/*.{js,css,ico,png,svg,webp,webmanifest}', 'prerendered/**/*.{html,json}']
}

function buildGlobIgnores(globIgnores?: string[]) {
Expand Down

0 comments on commit a7c0605

Please sign in to comment.