Both cut the JavaScript users download. Code splitting breaks the bundle into chunks loaded on demand; tree shaking removes code you never use. They're complementary: split what loads, shake out dead code inside each chunk.
Code splitting
Instead of one big bundle, the app is split so each route or heavy feature is a separate chunk fetched only when needed:
= ( ());
button. = () => {
{ openEditor } = ();
();
};
