UNPKG

johnny-cli

Version:

CLI for Johnny Deps

49 lines (40 loc) 1.11 kB
// @flow import path from 'path'; import webpack from 'webpack'; export default (params: { packages: Array<string>, path: string, }) => ({ devtool: false, entry : {vendor: params.packages}, target : 'web', output: { path : params.path, filename: 'dll.js', library : '[hash]' }, performance: {hints: false}, plugins: [ // Minimize moment.js bundle. Go for en locale only. new webpack.ContextReplacementPlugin(/moment[\\\/]locale$/, /^\.\/(en)$/), new webpack.optimize.OccurrenceOrderPlugin(), new webpack.LoaderOptionsPlugin({minimize: true, debug: false}), new webpack.optimize.UglifyJsPlugin({compress: {warnings: false, screw_ie8: true}}), new webpack.DefinePlugin({'process.env': {NODE_ENV: JSON.stringify('production')},}), new webpack.DllPlugin({ context: path.join('.', 'node_modules'), path : path.join(params.path, 'manifest.json'), name : '[hash]', }) ].filter(i => !!i), node: { console: true, fs : 'empty', net : 'empty', tls : 'empty', }, resolve: { extensions: ['.json', '.js'], modules: ['node_modules'] }, });