Skip to content

Instantly share code, notes, and snippets.

@teimurjan
Created May 21, 2018 06:27
Show Gist options
  • Save teimurjan/82c51eb614e04f06bb609aef07858358 to your computer and use it in GitHub Desktop.
Save teimurjan/82c51eb614e04f06bb609aef07858358 to your computer and use it in GitHub Desktop.
blog-react-applications-optimization
const webpack = require("webpack");
module.exports = {
entry: {
client: "./src/index.js",
vendor: ["react", "react-dom", "react-router", "react-router-dom"]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: "vendor",
filename: "vendor.[chunkhash].js"
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment