-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
65 lines (64 loc) · 1.95 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
53
54
55
56
57
58
59
60
61
62
63
64
65
var path = require("path");
var webpack = require("webpack");
module.exports = {
// This is the main file that should include all other JS files
entry: {
header: './src/common/header.js'
},
target: "web",
debug: true,
devtool: "source-map",
// We are watching in the gulp.watch, so tell webpack not to watch
watch: true,
//watchDelay: 300,
output: {
path: './built',
filename: '[name].built.js'
},
resolve: {
// Tell webpack to look for required files in bower and node
modulesDirectories: ['bower_components', 'node_modules', 'public'],
fallback: ['./public']
},
module: {
loaders: [{
test: /\.css$/,
loader: "style-loader!css-loader"
}, {
test: /\.less$/,
loader: "style-loader!css-loader!less-loader"
}, {
test: /\.gif/,
loader: "file-loader!url-loader?limit=10000&minetype=image/gif"
}, {
test: /\.jpg/,
loader: "file-loader!url-loader?limit=10000&minetype=image/jpg"
}, {
test: /\.png/,
loader: "file-loader!url-loader?limit=10000&minetype=image/png"
}, {
test: /\.jsx/,
loader: "jsx-loader"
},
// required for bootstrap/flat-ui
{
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"
},
],
noParse: /\.min\.js/
},
plugins: [
// If you want to minify everything
//new webpack.optimize.UglifyJsPlugin()
]
};