Skip to content

Commit

Permalink
Merge pull request #1420 from andrew8er/issues/1419-01-fix-could-not-…
Browse files Browse the repository at this point in the history
…load-virtual-vike-pageConfigValuesAll

Fix `Could not load virtual:vike:pageConfigValuesAll`
  • Loading branch information
brillout authored Jan 9, 2024
2 parents 18baf2b + 3275e1c commit f4c1d32
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions vike/node/shared/extractAssetsQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ const query = 'extractAssets'

function extractAssetsAddQuery(id: string): string {
const fileExtension = getFileExtension(id)
assert(fileExtension || id.includes('virtual:vike:'))
if (!fileExtension) return `${id}?${query}`
if (id.includes('?')) {
id = id.replace('?', `?${query}&`)
if (!fileExtension || id.includes('virtual:vike:')) {
return `${id}?${query}`
} else {
id = `${id}?${query}&lang.${fileExtension}`
if (!id.includes('?')) {
return `${id}?${query}&lang.${fileExtension}`
} else {
return id.replace('?', `?${query}&`)
}
}
return id
}

function extractAssetsRemoveQuery(id: string): string {
Expand Down

0 comments on commit f4c1d32

Please sign in to comment.