-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.tests.js
68 lines (61 loc) · 1.51 KB
/
webpack.tests.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
66
67
68
var config = {
/**
* Entry
* Reference: http://webpack.github.io/docs/configuration.html#entry
* Should be an empty object if it's generating a test build
*/
entry: {},
/**
* Output
* Reference: http://webpack.github.io/docs/configuration.html#output
* Should be an empty object if it's generating a test build
*/
output: {},
/**
* Devtool
* Reference: http://webpack.github.io/docs/configuration.html#devtool
* Type of sourcemap to use per build type
*/
devtool: 'inline-source-map',
/**
* Modules
*/
module: {
/**
* Preloaders
*/
preLoaders: [
// CODE COVERAGE REPORTING
// Reference: https://github.com/ColCh/isparta-instrumenter-loader
{
test: /\.js$/,
exclude: [ /node_modules/, /\.test\.js$/ ],
loader: 'isparta-instrumenter'
} ],
/**
* Loaders
* Reference: http://webpack.github.io/docs/configuration.html#module-loaders
* List: http://webpack.github.io/docs/list-of-loaders.html
*/
loaders: [
// JS LOADER
// Reference: https://github.com/babel/babel-loader
{
test: /\.js$/,
loader: "babel-loader",
exclude: /(node_modules|bower_components)/,
query: {
presets: [ "es2015" ]
}
},
// HTML LOADER
// Reference: https://github.com/webpack/html-loader
{
test: /\.html$/,
exclude: /(node_modules|bower_components)/,
loader: "html"
}
]
}
};
module.exports = config;