-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
59 lines (56 loc) · 1.07 KB
/
webpack.config.js
File metadata and controls
59 lines (56 loc) · 1.07 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 = {
devServer: {
overlay: {
errors: true,
warnings: true
}
},
entry: './src/supra.js',
// Where should the compiled file go?
output: {
path: path.join(__dirname, "dist"),
publicPath: 'dist/',
// With the filename `build.js` so it's dist/build.js
filename: 'build.js'
},
resolve: {
alias: {
// 'jQuery': 'jquery'
}
},
module: {
// Special compilation rules
rules: [
{
test: /\.css/,
use: [
"style-loader",
"css-loader"
]
},
{
test: /\.(png|jpe?g|gif|svg|woff|eot|ttf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: '[path][name].[hash].[ext]'
}
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
]
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
// d3: 'd3',
'$.bxSlider': 'bxslider'
})
]
}