@@ -19,6 +19,14 @@ modulePrototype.require = originalRequire;
1919webpackConfig . resolve . extensions = [ '' , '.js' ] ;
2020webpackConfig . 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+
2230var wallabyWebpack = require ( 'wallaby-webpack' ) ;
2331var 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