forked from rowanwins/vue-dropzone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
75 lines (65 loc) · 1.84 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
var path = require('path');
var version = require('./package.json').version;
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var banner =
'/*!\n' +
' * Keen UI v' + version + ' (https://github.com/JosephusPaye/keen-ui)\n' +
' * (c) ' + new Date().getFullYear() + ' Josephus Paye II\n' +
' * Released under the MIT License.\n' +
' */';
module.exports = {
watch: true,
devtool: '#eval-source-map',
entry: './src-docs/main.js',
output: {
path: path.join(__dirname, 'docs'),
filename: 'docs.bundle.js'
},
resolveLoader: {
root: path.join(__dirname, 'node_modules'),
},
module: {
loaders: [{
test: /\.vue$/,
loader: 'vue'
}, {
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/
}, {
test: /\.json$/,
loader: 'json'
}, {
test: /\.html$/,
loader: 'vue-html'
}, {
test: /\.(png|jpg|gif|svg)$/,
loader: 'url',
query: {
limit: 10000,
name: '[name].[ext]?[hash]'
}
}, {
test: /draggabilly|desandro|get\-size|classie|unidragger|unipointer|eventemitter/,
loader: 'imports?define=>false&this=>window'
}]
},
vue: {
loaders: {
css: ExtractTextPlugin.extract('css'), // extract css and stylus files to a single file
stylus: ExtractTextPlugin.extract('css!stylus')
},
autoprefixer: {
browsers: ['last 2 versions', 'ie > 8', 'Firefox ESR']
}
},
babel: {
presets: ['es2015', 'stage-2'],
plugins: ['transform-runtime'],
comments: false
},
plugins: [
new ExtractTextPlugin('docs.bundle.css')
],
banner: banner
};