mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-19 15:10:58 +00:00
feat(schema): enable rich json payloads by default (#20770)
This commit is contained in:
parent
a33d2e7aec
commit
95a0e17898
@ -93,9 +93,8 @@ export default defineUntypedSchema({
|
|||||||
*/
|
*/
|
||||||
noScripts: false,
|
noScripts: false,
|
||||||
|
|
||||||
// TODO: enable by default in v3.5
|
|
||||||
/** Render JSON payloads with support for revivifying complex types. */
|
/** Render JSON payloads with support for revivifying complex types. */
|
||||||
renderJsonPayloads: false,
|
renderJsonPayloads: true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disable vue server renderer endpoint within nitro.
|
* Disable vue server renderer endpoint within nitro.
|
||||||
|
@ -34,7 +34,7 @@ describe.skipIf(isWindows || process.env.TEST_BUILDER === 'webpack' || process.e
|
|||||||
|
|
||||||
it('default client bundle size', async () => {
|
it('default client bundle size', async () => {
|
||||||
stats.client = await analyzeSizes('**/*.js', publicDir)
|
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(`
|
expect(stats.client.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(`
|
||||||
[
|
[
|
||||||
"_nuxt/entry.js",
|
"_nuxt/entry.js",
|
||||||
@ -45,7 +45,7 @@ describe.skipIf(isWindows || process.env.TEST_BUILDER === 'webpack' || process.e
|
|||||||
|
|
||||||
it('default server bundle size', async () => {
|
it('default server bundle size', async () => {
|
||||||
stats.server = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir)
|
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)
|
const modules = await analyzeSizes('node_modules/**/*', serverDir)
|
||||||
expect(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2658k"')
|
expect(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2658k"')
|
||||||
|
Loading…
Reference in New Issue
Block a user