UNPKG

wci-build

Version:
38 lines (35 loc) 832 B
const path = require('path'); const webpack = require('webpack'); const fs = require('fs'); const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin'); import { DEFAULT_PATH, } from './config'; module.exports = { mode: 'production', entry: { antd: ['antd'], antd3: ['@ant-design'], }, output: { path: path.resolve(DEFAULT_PATH, `dll`), filename: `[name].[chunkHash:8].js`, library: '_dll_[name]', }, plugins: [ new webpack.DllPlugin({ path: path.resolve(DEFAULT_PATH, `dll/[name].[chunkHash:8].json`), name: '_dll_[name]', }), // ParallelUglifyPlugin可实现多线程代码压缩 new ParallelUglifyPlugin({ cacheDir: '.cache/', uglifyJS: { output: { comments: false }, warnings: false } }), ], };