-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
50 lines (48 loc) · 1.44 KB
/
webpack.config.js
File metadata and controls
50 lines (48 loc) · 1.44 KB
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
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: {
vendor: [
// JS
'react',
'flux',
'immutable',
path.join(__dirname, 'static/js/3rdparty/typeahead.js'),
// CSS
path.join(__dirname, 'static/css/bootstrap.css'),
path.join(__dirname, 'static/css/typeaheadjs.css'),
],
VideoPage: path.join(__dirname, 'static/js/pages/VideoPage.react'),
HomePage: path.join(__dirname, 'static/js/pages/HomePage.react'),
DSMPage: path.join(__dirname, 'static/js/pages/DSMPage.react'),
},
output: {
path: path.join(__dirname, 'static/build'),
filename: '[name]-[chunkhash].js',
publicPath: '/build/',
sourcePrefix: ' '
},
module: {
loaders: [
{test: /\.js$/, loader: 'jsx-loader?harmony&stripTypes'},
{test: /\.css$/, loader: 'style-loader!css-loader'},
{test: /\.(png|jpg|gif)$/, loader: 'url-loader?limit=8192'},
// fonts
{ test: /\.woff$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff' },
{ test: /\.(ttf|eot|svg)$/, loader: 'file-loader' },
]
},
resolve: {
extensions: ['', '.js']
},
watchDelay: 50,
plugins: [
require('./webpack/plugins/beep_error'),
require('./webpack/plugins/export_stats'),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.CommonsChunkPlugin(
/* chunkName */'vendor',
/* filename */'[name]-[chunkhash].js'
),
]
};