mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): don't use prerenderedAt
to override app manifest (#23781)
This commit is contained in:
parent
bfaf56ceac
commit
91c62d6c3e
@ -79,10 +79,7 @@ async function _importPayload (payloadURL: string) {
|
||||
export async function isPrerendered (url = useRoute().path) {
|
||||
// Note: Alternative for server is checking x-nitro-prerender header
|
||||
const nuxtApp = useNuxtApp()
|
||||
if (nuxtApp.payload.prerenderedAt) {
|
||||
return true
|
||||
}
|
||||
if (!appManifest) { return false }
|
||||
if (!appManifest) { return !!nuxtApp.payload.prerenderedAt }
|
||||
const manifest = await getAppManifest()
|
||||
if (manifest.prerendered.includes(url)) {
|
||||
return true
|
||||
|
@ -19,7 +19,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
|
||||
for (const outputDir of ['.output', '.output-inline']) {
|
||||
it('default client bundle size', async () => {
|
||||
const clientStats = await analyzeSizes('**/*.js', join(rootDir, outputDir, 'public'))
|
||||
expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"99.2k"')
|
||||
expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"99.1k"')
|
||||
expect(clientStats.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(`
|
||||
[
|
||||
"_nuxt/entry.js",
|
||||
|
Loading…
Reference in New Issue
Block a user