-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.test.conf.js
executable file
·51 lines (42 loc) · 1.13 KB
/
webpack.test.conf.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
const path = require('path');
const glob = require('glob');
const _ = require('lodash');
process.env.IS_SUMAN_BROWSER_TEST='yes';
const all = su.flattenDeep([process.env.SUMAN_BROWSER_TEST_PATHS || glob.sync('./test/src/dev/browser/**/*.ts')]);
const entries = all.filter(f => f);
if(!entries.length){
throw new Error('no test files could be found given your webpack configuration.');
}
module.exports = {
entry: entries,
output: {
path: path.resolve(__dirname + '/test/.suman/browser/builds'),
filename: 'browser-tests.js'
},
module: {
rules: [
{
test: /babel-polyfill/,
loader: 'ignore-loader'
},
{
// ignore both .ts and .d.ts files
test: /\.ts$/,
loader: 'ts-loader'
},
{
// ignore both .ts and .d.ts files
test: /\.d\.ts$/,
loader: 'ignore-loader'
},
{
test: new RegExp('^' + path.resolve(__dirname + '/lib/cli-commands/') + '.*'),
loader: 'ignore-loader'
},
{
test: new RegExp('^' + path.resolve(__dirname + '/suman.conf.js')),
loader: 'ignore-loader'
}
]
}
};