4a7f28fd
Sergio Crisostomo
eslint and replac...
|
1
2
3
|
const path = require('path');
const webpack = require('webpack');
const entry = require('./locale');
|
aaa96346
Sergio Crisostomo
prepare dependencies
|
4
5
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
a3a725a1
Lawrence Lee
add locale packag...
|
6
7
8
|
process.env.NODE_ENV = 'production';
module.exports = {
|
71eb889f
Graham Fairweather
Enable creation o...
|
9
|
devtool: 'source-map',
|
aaf900f3
Lawrence Lee
update locale pac...
|
10
|
entry,
|
a3a725a1
Lawrence Lee
add locale packag...
|
11
12
13
14
15
|
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
|
ca9e77e9
Graham Fairweather
Missed config
|
16
17
18
|
options: {
sourceMap: true,
},
|
a3a725a1
Lawrence Lee
add locale packag...
|
19
20
|
exclude: /node_modules/
}
|
4a7f28fd
Sergio Crisostomo
eslint and replac...
|
21
|
]
|
a3a725a1
Lawrence Lee
add locale packag...
|
22
23
24
25
26
27
28
29
30
|
},
output: {
path: path.resolve(__dirname, '../dist/locale'),
publicPath: '/dist/locale/',
filename: '[name].js',
library: 'iview/locale',
libraryTarget: 'umd',
umdNamedDefine: true
},
|
54f510c5
梁灏
fixed not support...
|
31
32
33
34
35
36
37
38
|
externals: {
vue: {
root: 'Vue',
commonjs: 'vue',
commonjs2: 'vue',
amd: 'vue'
}
},
|
a3a725a1
Lawrence Lee
add locale packag...
|
39
40
41
42
43
|
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
|
593742af
梁灏
update locale bui...
|
44
|
}),
|
aaa96346
Sergio Crisostomo
prepare dependencies
|
45
|
new UglifyJsPlugin({
|
71eb889f
Graham Fairweather
Enable creation o...
|
46
47
|
parallel: true,
sourceMap: true,
|
a3a725a1
Lawrence Lee
add locale packag...
|
48
49
|
})
]
|
4a7f28fd
Sergio Crisostomo
eslint and replac...
|
50
|
};
|