iview/build/webpack.dist.dev.config.js

37 lines
883 B
JavaScript
Raw Normal View History

2017-09-29 09:45:50 +02:00
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const webpackBaseConfig = require('./webpack.base.config.js');
2016-11-03 17:21:04 +08:00
process.env.NODE_ENV = 'production';
2017-03-10 21:57:50 +08:00
module.exports = merge(webpackBaseConfig, {
2016-11-03 17:21:04 +08:00
entry: {
main: './src/index.js'
},
output: {
path: path.resolve(__dirname, '../dist'),
publicPath: '/dist/',
filename: 'iview.js',
library: 'iview',
libraryTarget: 'umd',
umdNamedDefine: true
},
2016-11-09 18:23:17 +08:00
externals: {
2016-11-17 16:28:36 +08:00
vue: {
root: 'Vue',
commonjs: 'vue',
commonjs2: 'vue',
amd: 'vue'
}
2016-11-09 18:23:17 +08:00
},
2016-11-03 17:21:04 +08:00
plugins: [
2017-03-10 21:57:50 +08:00
// @todo
2016-11-03 17:21:04 +08:00
new webpack.DefinePlugin({
'process.env': {
2017-03-10 21:57:50 +08:00
NODE_ENV: '"production"'
2016-11-03 17:21:04 +08:00
}
})
]
});