Last active
September 15, 2017 01:10
-
-
Save whilelucky/563e6bda38f4f5b6293ceb32f38c85a2 to your computer and use it in GitHub Desktop.
route-splitting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Route | |
name="landing" | |
path="/" | |
getComponent={ | |
(_, cb) => import('./views/LandingPage/LandingPage' /* webpackChunkName: 'landing' */) | |
.then((module) => cb(null, module.default)) | |
.catch((error) => cb(error, null)) | |
} | |
</Route> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//extract css from all the split chunks into main.hash.css | |
new ExtractTextPlugin({ | |
filename: 'css/[name].[contenthash:8].css', | |
allChunks: true, | |
}), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment