-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathwebpack.config.js
52 lines (43 loc) · 1.14 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
var webpack = require('webpack');
var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
// webpack options
entry: {
// the main angular module
'rxvision': './run/rx.js',
'viz': './run/viz.js',
'kefirvision': './run/kefir.js',
'playground': './run/playground.js',
'tests': './run/tests.js',
},
node: {
fs: 'empty',
net: 'empty',
},
output: {
path: "./build",
// TODO(jared): think about using hashes to make caching a thing
filename: "[name].js",
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?optional=runtime' },
{ test: /\.json$/, loader: 'json' },
{
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader")
},
{
test: /\.less$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader!less-loader")
}
],
},
plugins: [commonsPlugin],
devtool: 'eval',
colors: true,
plugins: [
new ExtractTextPlugin("[name].css")
],
}