forked from syarul/webpack-tape-run
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.test.js
46 lines (45 loc) · 966 Bytes
/
webpack.test.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
const WebpackTapeRun = require('./')
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: './test',
mode: 'development',
output: {
path: path.resolve(__dirname, './output'),
filename: 'test.js'
},
module: {
rules: [
{
loader: 'transform-loader',
enforce: 'post',
exclude: [/node_modules/],
options: {
coverify: true
}
}
]
},
resolve: {
modules: ['node_modules'],
extensions: ['*', '.js'],
fallback: {
fs: false,
buffer: false,
path: require.resolve('path-browserify'),
stream: require.resolve('stream-browserify')
}
},
target: 'web',
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser'
}),
new WebpackTapeRun({
tapeRun: {
/* browser: 'phantomjs' */
},
reporter: 'coverify'
})
]
}