This repository has been archived by the owner on Nov 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
56 lines (55 loc) · 1.81 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
let path = require('path'),
webpack = require('webpack')
module.exports = {
//context is base directory(aka absolute path) for resolving entry
context: path.resolve('src'),
//entry point, files that has all hook
entry: ['./app/app-module'],
//bundle file output location
output: {
path: path.resolve('app/compiled/js/'),
filename: "bundle.js"
},
devServer: {
contentBase: 'public'
},
watch: true,
module: {
loaders: [{
test: /\.es6$/,
exclude: /node_modules/,
loader: "babel-loader"
}, {
test: /\.(png|jpg|ttf|eot)$/,
exclude: /node_modules/,
loader: 'url-loader?limit=10000'
}, {
test: /\.css$/,
loader: "style-loader!css-loader!autoprefixer-loader"
}, {
test: /\.scss$/,
loader: "style-loader!css-loader!sass-loader"
}, {
test: /\.html$/,
exclude: /node_modules/,
loader: "raw-loader"
}, {
test: [/fontawesome-webfont\.svg/, /fontawesome-webfont\.eot/, /fontawesome-webfont\.ttf/, /fontawesome-webfont\.woff/, /fontawesome-webfont\.woff2/],
loader: 'file?name=fonts/[name].[ext]'
}, {
test: /\.json$/,
exclude: /node_modules/,
loader: "json-loader"
},
// {
// test: require.resolve("jquery"),
// loader: "expose-loader?$!expose-loader?jQuery"
// }
]
},
target: 'electron',
resolve: {
//array of file extensions that will be included to be process in module
extensions: ['', '.js', '.es6', '.json']
}
}