Skip to content

Instantly share code, notes, and snippets.

@jprivillaso
Created October 30, 2017 13:24
Show Gist options
  • Save jprivillaso/210dc0e7ee9adc27ef7a19cb0e96c1db to your computer and use it in GitHub Desktop.
Save jprivillaso/210dc0e7ee9adc27ef7a19cb0e96c1db to your computer and use it in GitHub Desktop.
'use strict';
const webpack = require('webpack');
const path = require('path');
const vendorLibs = [
'lodash',
'moment',
'react',
'react-dom',
'react-redux',
'redux',
'redux-saga'
];
module.exports = {
entry: {
'vendor': vendorLibs,
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
library: '[name]_lib',
},
plugins: [
new webpack.DllPlugin({
path: 'dist/[name]-manifest.json',
name: '[name]_lib'
}),
],
}
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment