Skip to content

Commit 69016ec

Browse files
authored
Merge pull request #2 from ArtemGovorov/patch-1
Update wallaby.js
2 parents ff6951a + 5d9344e commit 69016ec

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

wallaby.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ modulePrototype.require = originalRequire;
1919
webpackConfig.resolve.extensions = ['', '.js'];
2020
webpackConfig.devtool = 'source-map';
2121

22+
// Cleaning it
23+
delete webpackConfig.entry;
24+
delete webpackConfig.devServer;
25+
delete webpackConfig.resolve.root;
26+
delete webpackConfig.module.postLoaders;
27+
webpackConfig.module.loaders.shift();
28+
webpackConfig.plugins = webpackConfig.plugins.filter(p => !p.getPath);
29+
2230
var wallabyWebpack = require('wallaby-webpack');
2331
var wallabyPostprocessor = wallabyWebpack(webpackConfig);
2432

@@ -29,14 +37,22 @@ module.exports = function (wallaby) {
2937
// as they should not be loaded in browser,
3038
// their wrapped versions will be loaded instead
3139
files: [
32-
// {pattern: 'lib/jquery.js', instrument: false},
33-
{pattern: 'src/app/**/*.ts', load: false}
40+
{pattern: 'node_modules/babel-polyfill/dist/polyfill.js', instrument: false},
41+
{pattern: 'src/app/**/*.ts', load: false},
42+
{pattern: 'src/**/*.json', load: false},
43+
{pattern: 'test/lib/setup.ts', load: false},
3444
],
3545

3646
tests: [
3747
{pattern: 'test/unit/**/*.spec.ts', load: false}
3848
],
3949

50+
preprocessors: {
51+
'**/*.js': file => require('babel-core').transform(
52+
file.content,
53+
{sourceMap: true, presets: ['es2015-loose-native-modules']})
54+
},
55+
4056
postprocessor: wallabyPostprocessor,
4157

4258
setup: function () {

0 commit comments

Comments
 (0)