forked from 2015-IKDDE-Course/data-visualization-proj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
49 lines (47 loc) · 1.31 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
var jsx_src = './Team_10/js/src/';
var jsx_dist = './Team_10/js/dist/';
var lib_src = './node_modules';
var webpack = require('webpack');
module.exports = {
entry: {
'index': jsx_src + 'index.jsx',
'common': [
lib_src + '/jquery/dist/jquery.js',
lib_src + '/material-design-lite/material.js',
lib_src + '/material-design-lite/material.css',
lib_src + '/d3/d3.js',
lib_src + '/leaflet/dist/leaflet.js',
lib_src + '/leaflet/dist/leaflet.css'
]
},
output: {
filename: '[name].min.js',
path: jsx_dist,
publicPath: '/Team_10/js/dist/'
},
module: {
loaders: [
{
test: /\.jsx$/,
loader: 'babel',
query: {
presets: ['es2015']
}
},
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.png$/, loader: 'url-loader?limit=100000' }
]
},
/* externals: {
'react': 'React',
'd3': 'd3'
},
*/
resolve: {
extensions: ['', '.js', '.jsx', '.css', '.min.css', '.min.js', '.json']
},
//plugins: [commonsPlugin, minifyPlugin]
plugins: [
new webpack.optimize.CommonsChunkPlugin('common', 'common.min.js')
]
}