-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathwebpack.config.js
42 lines (41 loc) · 987 Bytes
/
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
var path = require('path');
var jsSrc = path.join(__dirname, '/src');
var examplesDir = path.join(__dirname, '/examples');
var testsDir = path.join(__dirname, '/tests');
var webpack = require('webpack');
var WebpackNotifierPlugin = require('webpack-notifier');
module.exports = {
entry: {
examples: examplesDir + '/index.jsx'
},
externals: {
'react': 'React',
'react/addons': 'React'
},
devtool: 'source-map', // To support Firefox, switch to exec
output: {
path: path.join(__dirname, '/www'),
filename: '[name].bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel-loader'],
include: [jsSrc, testsDir, examplesDir],
},
{
test: /\.md$/,
loaders: ['raw-loader']
},
{
test: /\.jsx$/,
loaders: ['babel-loader', 'jsx-loader'],
include: [jsSrc, testsDir, examplesDir]
}
]
},
plugins: [
new WebpackNotifierPlugin()
]
};