justwrite icon indicating copy to clipboard operation
justwrite copied to clipboard

Optimization

Open themeblvd opened this issue 6 years ago • 1 comments

Can we get this down? After minification, it's currently 893 KB.

themeblvd avatar Jun 13 '18 18:06 themeblvd

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'
);

themeblvd avatar Jul 05 '18 19:07 themeblvd