forked from charliekassel/vuejs-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.prod.conf.js
42 lines (40 loc) · 1.03 KB
/
webpack.prod.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var env = process.env.NODE_ENV === 'testing'
? require('../config/test.env')
: config.build.env
var webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true
})
},
devtool: config.build.productionSourceMap ? '#source-map' : false,
entry: '@/components/Datepicker.vue',
externals: {
vue: 'vue'
},
output: {
path: config.build.assetsRoot,
filename: 'build.js',
library: 'vuejs-uploader',
libraryTarget: 'commonjs2'
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
sourceMap: true
})
]
})
module.exports = webpackConfig