File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -7,20 +7,26 @@ The AVA [readme](https://github.com/avajs/ava#transpiling-imported-modules) ment
7
7
###### webpack.config.js
8
8
9
9
``` js
10
+ const path = require (' path' );
11
+ // To pre-compile folder with multiple test files, we can use glob
12
+ // see http://stackoverflow.com/questions/32874025/how-to-add-wildcard-mapping-in-entry-of-webpack/34545812#34545812
13
+ // const glob = require('glob');
14
+
10
15
const nodeExternals = require (' webpack-node-externals' );
11
16
12
17
module .exports = {
13
18
entry: [' src/tests.js' ],
19
+ // entry: glob.sync('./test/**/*.js'),
14
20
target: ' node' ,
15
21
output: {
16
- path: ' _build' ,
22
+ path: path . resolve ( __dirname , ' _build' ) ,
17
23
filename: ' tests.js'
18
24
},
19
25
externals: [nodeExternals ()],
20
26
module: {
21
27
rules: [{
22
- test: / \. (js| jsx)$ / ,
23
- use: ' babel-loader'
28
+ test: / \. (js| jsx)$ / ,
29
+ use: ' babel-loader'
24
30
}]
25
31
}
26
32
};
You can’t perform that action at this time.
0 commit comments