forked from javisperez/vuedals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
85 lines (78 loc) · 2.01 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
const webpack = require('webpack');
const packageInfo = require('./package.json');
const banner =
" Vuedals plugin v" + packageInfo.version + "\n" +
"\n" +
" Multiple event based modal windows, with a single component\n" +
"\n" +
" This is a plugin to open any number of modal windows without having to attach them to the DOM\n" +
" @author "+ packageInfo.author.name +" <"+ packageInfo.author.email +">\n" +
" "+ packageInfo.homepage +"\n" +
" Released under the MIT License.";
module.exports = {
entry: './src/main.js',
output: {
path: './dist/',
filename: 'vuedals.js',
library: 'Vuedals',
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.scss$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader'
]
}
],
loaders: [
{
test: /\.js$/,
loader: 'babel',
include: __dirname,
exclude: /node_modules/
},
{
test: /\.vue$/,
loader: 'vue'
},
{
test: /\.s[a|c]ss$/,
loader: 'style!css!sass'
}
]
},
vue: {
loaders: {
scss: 'css-loader!sass-loader'
}
},
resolve: {
extensions: ['', '.js', '.vue'],
alias: {
'vue$': 'vue/dist/vue.common.js'
}
},
plugins: [
new webpack.BannerPlugin(banner),
new webpack.optimize.UglifyJsPlugin({
minimize: false,
sourceMap: false,
mangle: false,
compress: {
warnings: false
},
output: {
comments: true
}
})
]
};