import * as webpack from 'webpack'; import * as path from 'path'; import UglifyJSPlugin = require('uglifyjs-webpack-plugin'); import { outputDir } from './outputPath'; const dllName = "dll" const vendors = [ "@blueprintjs/core", "css-element-queries", "mobx", "mobx-react", "react", "react-addons-css-transition-group", "react-color", "react-dom", "stats.js", "xaop", "blueimp-md5" ]; const config: webpack.Configuration = { mode: "production", output: { path: path.resolve(__dirname, outputDir), filename: dllName + '.js', library: dllName, }, entry: { "lib": vendors, }, plugins: [ new webpack.DllPlugin({ path: path.resolve(__dirname, `${outputDir}manifest.json`), name: dllName, context: __dirname, }), new UglifyJSPlugin( { sourceMap: true, cache: true, extractComments: true, parallel: 4 } ) ], }; export default config;