Skip to content

Instantly share code, notes, and snippets.

@whilelucky
Created July 3, 2017 05:07
Show Gist options
  • Save whilelucky/d809f1d8fb7c5702b875435599d78d68 to your computer and use it in GitHub Desktop.
Save whilelucky/d809f1d8fb7c5702b875435599d78d68 to your computer and use it in GitHub Desktop.
singe-page-application
entry: {
main: './client/index.js',
},
output: {
path: path.resolve('./build/client'),
filename: 'js/[name].[chunkhash:8].js',
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, use: ['babel-loader'] },
{ test: /\.css$/, loader: ExtractTextPlugin.extract({ fallback: ['style-loader'], use: ['css-loader'] }) },
],
}
new ExtractTextPlugin('css/[name].[contenthash:8].css'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment