custom-app
Version:
ITIMS��Ʒ�鿪��ר��React���,�Dz��ý��ּ�dhcc-app���������
50 lines (48 loc) • 1.27 kB
JavaScript
const path = require('path')
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ExtractCSS = new ExtractTextPlugin({
filename: '[name].dll.css',
allChunks: true,
});
const VendorDll = new webpack.DllPlugin({
path: path.resolve(__dirname, '..', 'dll', '[name]-manifest.json'),
name: 'dll_[name]',
// context: 'f:/dll'
});
module.exports = {
mode: 'production',
entry: {
reacts: ['react', 'react-dom', 'react-router-dom'],
reduxs: ['immutable', 'redux-immutable', 'history', 'axios', 'react-redux', 'redux-thunk'],
jquery: ['jquery'],
reactTable: ['react-table', 'sortablejs'],
antd: ['antd'],
planview: ['itims-tsp-planview'],
plantree: ['itims-tsp-plantree']
},
output: {
path: path.resolve(__dirname, '..', 'dll'),
filename: 'dll_[name].js',
library: "dll_[name]"
},
resolve: {
alias: {
'antd.css': path.resolve(__dirname, 'node_modules/antd/dist/antd.min.css')
}
},
module: {
// rules: [
// {
// test: /\.css$/,
// loader: ExtractCSS.extract({
// fallback: 'style-loader',
// use: ['css-loader']
// }),
// }]
},
plugins: [
// ExtractCSS,
VendorDll
]
};