Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree shake unused client reference exports #582

Open
hi-ogawa opened this issue Jul 19, 2024 · 1 comment
Open

Tree shake unused client reference exports #582

hi-ogawa opened this issue Jul 19, 2024 · 1 comment

Comments

@hi-ogawa
Copy link
Owner

Just remembered we haven't taken care of this while checking mantine example build in hi-ogawa/next-app-template#1

Probably ssr build creates one giant client reference which holds entire @mantine/core

▶▶▶ REACT SERVER BUILD (ssr) [4/4]
vite v5.3.4 building SSR bundle for production...
✓ 656 modules transformed.
dist/server/.vite/manifest.json                                       3.24 kB
dist/server/assets/create-theme-BnhyR2hf.js                           0.08 kB
dist/server/assets/_virtual_server-references-y-E-dViC-y-E-dViC.js    0.09 kB
dist/server/assets/theme-C6QRzPcV.js                                  0.16 kB
dist/server/assets/_virtual_client-references-gr0n_QHF.js             0.31 kB
dist/server/assets/_virtual_ssr-assets-CXKxdVsi.js                    0.38 kB
dist/server/assets/ColorSchemeToggle-sj0jnDtg.js                      0.68 kB
dist/server/assets/client-BQ8swztY-CtCsvDgM.js                        0.71 kB
dist/server/assets/_virtual_route-manifest-DMuu4Nf6.js                1.00 kB
dist/server/assets/client-2vuMQ-3j.js                                 3.77 kB
dist/server/index.js                                                 28.29 kB
dist/server/assets/Button-Jhh0NtFR.js                                72.04 kB
dist/server/assets/index-DPfROtXM.js                                342.41 kB
dist/server/assets/index-BjaqkVyi.js                                552.97 kB      // <-- this one
// dist/server/assets/_virtual_client-references-gr0n_QHF.js
const _virtual_clientReferences = {
  "cbf0dc6ca9": () => import("./client-2vuMQ-3j.js"),
  "cff744f2a7": () => import("./index-BjaqkVyi.js"),  // <-- this one
  "0f20e3f653": () => import("./theme-C6QRzPcV.js"),
  "2090238440": () => import("./ColorSchemeToggle-sj0jnDtg.js")
};
export {
  _virtual_clientReferences as default
};
@hi-ogawa
Copy link
Owner Author

hi-ogawa commented Aug 6, 2024

I wonder how Astro handles for client island. cf. #597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant