-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
58 lines (58 loc) · 1.47 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
//less
//angular
//js
var path = require('path');
var webpack = require('webpack')
module.exports = {
watch: true,
eslint: {
emitError: true,
failOnWarning: true,
failOnError: true
},
entry: {
charts: "./charts.entry.js",
scores: "./scores.entry.js",
},
output: {
path: path.join(__dirname, "dashoard/static/dist"),
filename: "[name].bundle.js",
publicPath: "/static/dist/"
},
module: {
loaders: [{
test: /\.less$/,
loader: "style!css!less"
}, {
test: /\.css$/,
loader: "style-loader!css-loader"
}, {
test: /\.png$/,
loader: "url-loader?limit=100000"
}, {
test: /\.jpg$/,
loader: "file-loader"
}, {
test: /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
loader: 'file-loader'
}, {
test: /\.js$/,
loader: "eslint-loader",
exclude: [/node_modules/, /vendor/]
}]
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
}),
new webpack.NoErrorsPlugin()
],
resolve: {
alias: {
jquery: "jquery/dist/jquery.js",
'datatables.net': "datatables/media/js/jquery.dataTables.js",
},
modulesDirectories: ['dashboard/static/vendor', 'dashboard/static/js', 'dashboard/static/css']
}
};