Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Commit 1451c97

Browse files
chore(test): Inline karma-webpack config
1 parent bd6046a commit 1451c97

File tree

2 files changed

+24
-30
lines changed

2 files changed

+24
-30
lines changed

karma.conf.js

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Karma configuration file
22
var karma = require("karma");
3-
var DEFAULT_NG_VERSION = "1.5";
3+
var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
4+
var DEFAULT_NG_VERSION = "1.6";
45

56
/**
67
* This returns a Karma 'files configuration'.
@@ -30,8 +31,28 @@ function karmaServedFiles(ngVersion) {
3031
return angularFiles.concat('test/index.js');
3132
}
3233

33-
var webpackConfig = require('./webpack.config.js');
34-
webpackConfig.devtool = 'inline-source-map';
34+
var webpackConfig = module.exports = {
35+
resolve: {
36+
modules: ['node_modules'],
37+
extensions: ['.js', '.jsx', '.ts', '.tsx']
38+
},
39+
40+
devtool: 'inline-source-map',
41+
42+
module: {
43+
rules: [
44+
{ test: /\.tsx?$/, loader: 'ts-loader', options: { transpileOnly: true } }
45+
]
46+
},
47+
48+
stats: false,
49+
50+
plugins: [
51+
new ForkTsCheckerWebpackPlugin(),
52+
],
53+
54+
externals: [ 'angular' ]
55+
};
3556

3657
module.exports = function(config) {
3758
var ngVersion = config.ngversion || DEFAULT_NG_VERSION;

webpack.config.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)