feat(schema): enable rich json payloads by default (#20770)

This commit is contained in:
Daniel Roe 2023-05-10 23:31:13 +01:00 committed by GitHub
parent a33d2e7aec
commit 95a0e17898
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -93,9 +93,8 @@ export default defineUntypedSchema({
*/
noScripts: false,
// TODO: enable by default in v3.5
/** Render JSON payloads with support for revivifying complex types. */
renderJsonPayloads: false,
renderJsonPayloads: true,
/**
* Disable vue server renderer endpoint within nitro.

View File

@ -34,7 +34,7 @@ describe.skipIf(isWindows || process.env.TEST_BUILDER === 'webpack' || process.e
it('default client bundle size', async () => {
stats.client = await analyzeSizes('**/*.js', publicDir)
expect(roundToKilobytes(stats.client.totalBytes)).toMatchInlineSnapshot('"94.2k"')
expect(roundToKilobytes(stats.client.totalBytes)).toMatchInlineSnapshot('"96.6k"')
expect(stats.client.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(`
[
"_nuxt/entry.js",
@ -45,7 +45,7 @@ describe.skipIf(isWindows || process.env.TEST_BUILDER === 'webpack' || process.e
it('default server bundle size', async () => {
stats.server = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir)
expect(roundToKilobytes(stats.server.totalBytes)).toMatchInlineSnapshot('"67.7k"')
expect(roundToKilobytes(stats.server.totalBytes)).toMatchInlineSnapshot('"61.7k"')
const modules = await analyzeSizes('node_modules/**/*', serverDir)
expect(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2658k"')