justwrite
justwrite copied to clipboard
Optimization
Can we get this down? After minification, it's currently 893 KB.
Code splitting, by route: https://reactjs.org/docs/code-splitting.html#route-based-code-splitting
Tool for code splitting components in React: https://github.com/jamiebuilds/react-loadable
When code splitting with import()
, use magic comments (Webpack feature) for names of file chunks to be more meaningful. https://webpack.js.org/api/module-methods/#import-
import(
/* webpackChunkName: "foo" */
'foo'
);
For further optimization of code splitting, see: https://medium.com/webpack/link-rel-prefetch-preload-in-webpack-51a52358f84c (too new, not in Webpack docs yet)
import(
/* webpackChunkName: "foo" */
/* webpackPrefetch: true */
'foo'
);