webpack.dist.locale.config.js
741 Bytes
var path = require('path');
var webpack = require('webpack');
var entry = require('./locale');
process.env.NODE_ENV = 'production';
module.exports = {
entry,
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
}
],
},
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"'
}
})
]
}