-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
59 lines (58 loc) · 1.93 KB
/
webpack.config.js
File metadata and controls
59 lines (58 loc) · 1.93 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
51
52
53
54
55
56
57
58
59
var webpack = require("webpack");
var path = require("path");
module.exports = {
entry: {
doozy: path.resolve(__dirname, 'entry.js'),
},
eslint: {
configFile: '.eslintrc'
},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: /node_modules|bower_components/,
query: {
optional: ['spec.undefinedToVoid', 'runtime'],
stage: 0
}
},
{
test: /\.jsx?$/,
loader: 'eslint',
exclude: /node_modules|bower_components/
},
//{ test: /\.css$/, loader: "style!css" },
//{ test: /\.less$/, loader: "style!css!less" },
// required for bootstrap/font-awesome
//{ test: /\.woff$/, loader: "url-loader?prefix=font/&limit=5000&mimetype=application/font-woff" },
//{ test: /\.ttf$/, loader: "file-loader" },
//{ test: /\.eot$/, loader: "file-loader" },
//{ test: /\.svg$/, loader: "file-loader" },
]
},
externals: {
//don't bundle the 'react' npm package with our bundle.js
//but get it from a global 'React' variable
'react': 'React',
'react/addons': 'React.addons',
'toastr': 'toastr',
'jquery': '$',
'rx': 'Rx'
},
resolve: {
extensions: ['', '.js', '.jsx', '.json', '.coffee'],
root: path.resolve('./src/Client')
},
output: {
filename: 'react-[name].js',
path: './src/Server/js',
//at this directory our bundle file will be available
//make sure port 8090 is used when launching webpack-dev-server
publicPath: 'http://localhost:8090/assets'
}
// plugins: [
// new CommonsChunkPlugin("react-shared.js", ["deck", "kiosk", "powertrack", "playground"])
// ]
};