forked from cenfun/monocart-coverage-reports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config-istanbul.js
40 lines (36 loc) · 1.04 KB
/
webpack.config-istanbul.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
const path = require('path');
module.exports = {
mode: 'development',
devtool: 'source-map',
entry: path.resolve('test/mock/src/index.js'),
output: {
path: path.resolve('test/mock/istanbul/dist'),
filename: 'coverage-istanbul.js',
umdNamedDefine: true,
library: 'coverage-istanbul',
libraryTarget: 'umd'
},
module: {
rules: [{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
plugins: [
['istanbul', {
// the test or tests folder will be excluded by default
// https://github.com/istanbuljs/schema/blob/master/default-exclude.js
exclude: []
}]
]
}
}
}, {
test: /\.tsx?$/,
use: [
'@jsdevtools/coverage-istanbul-loader',
'ts-loader'
]
}]
}
};