-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathwebpack.config.base.js
More file actions
39 lines (37 loc) · 906 Bytes
/
Copy pathwebpack.config.base.js
File metadata and controls
39 lines (37 loc) · 906 Bytes
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
'use strict';
var fs = require('fs');
var path = require('path');
var _ = require('lodash');
module.exports = {
entry: _.chain(fs.readdirSync('./src/bindings'))
.map(function(item) {
var ext = item == 'vuejs' ? '.vue' : '.js';
return [item, './src/bindings/' + item + '/index' + ext];
})
.fromPairs()
.value(),
output: {
path: './dist',
library: 'Babbage',
libraryTarget: 'umd'
},
devtool: 'source-map',
resolve: {
fallback: path.join(__dirname, 'node_modules'),
},
externals: {
// require("jquery") is external and available
// on the global var jQuery
'jquery': 'jQuery',
// same d3 and c3
'd3': 'd3',
'c3': 'c3'
},
module: {
loaders: [
{ test: /\.vue$/, loader: 'vue' },
{ test: /\.js$/, loaders: [ 'babel-loader' ], exclude: /node_modules/ },
{ test: /\.html$/, loader: 'raw' }
]
}
};