2017-09-29 09:45:50 +02:00
|
|
|
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
|
|
const entry = require('./locale');
|
2017-07-17 16:03:21 +08:00
|
|
|
process.env.NODE_ENV = 'production';
|
|
|
|
|
|
|
|
module.exports = {
|
2017-07-17 23:36:33 +08:00
|
|
|
entry,
|
2017-07-17 16:03:21 +08:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
exclude: /node_modules/
|
|
|
|
}
|
2017-09-29 09:45:50 +02:00
|
|
|
]
|
2017-07-17 16:03:21 +08:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, '../dist/locale'),
|
|
|
|
publicPath: '/dist/locale/',
|
|
|
|
filename: '[name].js',
|
|
|
|
library: 'iview/locale',
|
|
|
|
libraryTarget: 'umd',
|
|
|
|
umdNamedDefine: true
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
'process.env': {
|
|
|
|
NODE_ENV: '"production"'
|
|
|
|
}
|
|
|
|
})
|
|
|
|
]
|
2017-09-29 09:45:50 +02:00
|
|
|
};
|