forked from vmaimone/vue-context-menu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
42 lines (39 loc) · 940 Bytes
/
webpack.config.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
const webpack = require( 'webpack' )
const config = {
entry: "./src/index.js",
output: {
filename: "vue-context-menu.js",
// path: __dirname,
publicPath: '.',
library: 'VueContextMenu',
libraryTarget: 'umd'
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.common.js'
}
},
plugins: [
new webpack.optimize.OccurrenceOrderPlugin()
],
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
}
}
if (process.env.NODE_ENV === 'production') {
let uglify = new webpack.optimize.UglifyJsPlugin({
compress: { warnings: false, screw_ie8: true }
})
config.plugins.push(uglify)
}
module.exports = config