Skip to content

Conversation

@kazupon
Copy link
Member

@kazupon kazupon commented Jan 3, 2025

With the introduction of Jit compilation in v9, code generation is no longer necessary for dist files, such as @intlify/core, vue-i18n and petite-vue-i18n globally.

This PR is optimized to reduce bundle size for those dist files.

@kazupon kazupon added the Type: Performance Includes performance fixes label Jan 3, 2025
PROPS_VALUE
) as MessageType<Message>
if (resolved) {
if (resolved != null) {
Copy link
Member Author

@kazupon kazupon Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In unit tests for regression, I found bug for Literal case, such as ''.
I've fixed it.

@github-actions
Copy link

github-actions bot commented Jan 3, 2025

Size Report

Bundles

File Size Gzip Brotli
core.esm-browser.prod.js 38.23 kB (-3.21 kB) 11.45 kB (-0.94 kB) 10.21 kB (-0.91 kB)
core.global.prod.js 31.23 kB (-2.77 kB) 10.63 kB (-0.89 kB) 9.54 kB (-0.82 kB)
core.prod.cjs 0.86 kB 0.41 kB 0.33 kB
core.runtime.esm-browser.prod.js 23.67 kB (+0.01 kB) 7.73 kB (-0.00 kB) 6.86 kB (+0.01 kB)
core.runtime.global.prod.js 18.18 kB (+0.01 kB) 7.09 kB (-0.00 kB) 6.33 kB (+0.00 kB)
message-compiler.esm-browser.prod.js 19.26 kB (+0.02 kB) 5.74 kB (+0.04 kB) 5.13 kB (+0.01 kB)
message-compiler.global.prod.js 17.29 kB (+0.04 kB) 5.52 kB (+0.03 kB) 4.99 kB (+0.05 kB)
message-compiler.prod.cjs 57.48 kB (+0.23 kB) 10.04 kB (+0.29 kB) 8.57 kB (+0.10 kB)
petite-vue-i18n.esm-browser.prod.js 37.03 kB (-3.21 kB) 11.35 kB (-0.97 kB) 10.20 kB (-0.91 kB)
petite-vue-i18n.global.prod.js 29.94 kB (-2.77 kB) 10.20 kB (-0.88 kB) 9.21 kB (-0.81 kB)
petite-vue-i18n.prod.cjs 25.78 kB 6.05 kB 5.25 kB
petite-vue-i18n.runtime.esm-browser.prod.js 22.60 kB (+0.01 kB) 7.35 kB (-0.00 kB) 6.62 kB
petite-vue-i18n.runtime.global.prod.js 16.94 kB (+0.01 kB) 6.43 kB (-0.00 kB) 5.81 kB (+0.00 kB)
vue-i18n-core.esm-browser.prod.js 37.68 kB 11.02 kB 9.91 kB
vue-i18n-core.global.prod.js 30.15 kB 9.97 kB 8.99 kB
vue-i18n-core.prod.cjs 59.16 kB 11.90 kB 10.22 kB
vue-i18n.esm-browser.prod.js 56.49 kB (-3.21 kB) 16.43 kB (-0.95 kB) 14.69 kB (-0.92 kB)
vue-i18n.global.prod.js 46.14 kB (-2.77 kB) 14.90 kB (-0.89 kB) 13.42 kB (-0.83 kB)
vue-i18n.prod.cjs 59.46 kB 11.98 kB 10.30 kB
vue-i18n.runtime.esm-browser.prod.js 42.06 kB (+0.01 kB) 12.44 kB (-0.00 kB) 11.16 kB (-0.01 kB)
vue-i18n.runtime.global.prod.js 33.13 kB (+0.01 kB) 11.16 kB (-0.00 kB) 10.09 kB (+0.01 kB)

Usages

Name Size Gzip Brotli
@intlify/core 9.02 kB 3.74 kB 3.40 kB
petite-vue-i18n 78.11 kB (+0.01 kB) 30.49 kB (+0.00 kB) 27.44 kB (+0.03 kB)
vue-i18n 87.72 kB (+0.01 kB) 33.69 kB (-0.00 kB) 30.23 kB (-0.02 kB)

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 3, 2025

Open in Stackblitz

@intlify/core

npm i https://pkg.pr.new/@intlify/core@2065

@intlify/core-base

npm i https://pkg.pr.new/@intlify/core-base@2065

@intlify/devtools-types

npm i https://pkg.pr.new/@intlify/devtools-types@2065

@intlify/message-compiler

npm i https://pkg.pr.new/@intlify/message-compiler@2065

petite-vue-i18n

npm i https://pkg.pr.new/petite-vue-i18n@2065

@intlify/shared

npm i https://pkg.pr.new/@intlify/shared@2065

vue-i18n

npm i https://pkg.pr.new/vue-i18n@2065

@intlify/vue-i18n-core

npm i https://pkg.pr.new/@intlify/vue-i18n-core@2065

commit: 14a6f64

@kazupon kazupon merged commit f670758 into master Jan 3, 2025
27 checks passed
@kazupon kazupon deleted the perf/more-optimize-bundle-size branch January 3, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Performance Includes performance fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants