[Tyler McGinnis] Code Splitting with React and React Router
const LazyHome = React.lazy(() => import('./Home'))
const LazyTopics = React.lazy(() => import('./Topics'))<React.Suspense fallback={<Loading />}>
<Route exact path='/' component={LazyHome} />
<Route path='/settings' component={LazySettings} />
</React.Suspense>
[webpack.js.org] code-splitting
[React on AWS] code splitting in create react app
const AsyncHome = asyncComponent(() => import("./containers/Home"));$ npm install --save react-loadable
[webpack.js.org] concepts / loaders
A loader is a node module that exports a function. This function is called when a resource should be transformed by this loader.
Loaders can be chained. A chain is executed in reverse order.
a string containing the content of the resource file
All webpack CLI options are valid for the webpack-dev-server CLI too