update the master branch to the latest
This commit is contained in:
parent
67d534df27
commit
23a0ba9831
611 changed files with 122648 additions and 0 deletions
50
build/webpack.dist.locale.config.js
Normal file
50
build/webpack.dist.locale.config.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const entry = require('./locale');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
module.exports = {
|
||||
devtool: 'source-map',
|
||||
entry,
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
exclude: /node_modules/
|
||||
}
|
||||
]
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../dist/locale'),
|
||||
publicPath: '/dist/locale/',
|
||||
filename: '[name].js',
|
||||
library: 'iview/locale',
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true
|
||||
},
|
||||
externals: {
|
||||
vue: {
|
||||
root: 'Vue',
|
||||
commonjs: 'vue',
|
||||
commonjs2: 'vue',
|
||||
amd: 'vue'
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: '"production"'
|
||||
}
|
||||
}),
|
||||
new UglifyJsPlugin({
|
||||
parallel: true,
|
||||
sourceMap: true,
|
||||
})
|
||||
]
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue