-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.js
52 lines (47 loc) · 1.27 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
52
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
"webpack-dev-server/client?http://0.0.0.0:8080",
'webpack/hot/only-dev-server',
'./src/scripts/router'
],
devtool: "eval",
debug: true,
output: {
path: path.join(__dirname, "public"),
filename: 'bundle.js'
},
resolveLoader: {
modulesDirectories: ['node_modules']
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.IgnorePlugin(/vertx/), // https://github.com/webpack/webpack/issues/353
new webpack.ProvidePlugin({
"_": "underscore"
}),
],
resolve: {
extensions: ['', '.js', '.cjsx', '.coffee', '.less', '.ttf', '.eot', '.woff'],
modulesDirectories:[
'node_modules',
'bower_components'
]
},
externals:{
"jquery": "var jQuery",
"$" : "var jQuery"
},
module: {
loaders: [
{ test: /\.css$/, loaders: ['style', 'css']},
{ test: /\.less/, loader: "style!css!less?outputStyle=expanded"},
{ test: /\.cjsx$/, loaders: ['react-hot', 'coffee', 'cjsx']},
{ test: /\.(jpg|png|gif|svg)/, loader: 'file-loader'},
{ test: /\.coffee$/, loader: 'coffee' },
{ test: /\.(eot|ttf|woff)/, loader: 'file-loader'}
]
}
};