Skip to content

Commit

Permalink
chore(test): Inline karma-webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Oct 5, 2017
1 parent bd6046a commit 1451c97
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 30 deletions.
27 changes: 24 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Karma configuration file
var karma = require("karma");
var DEFAULT_NG_VERSION = "1.5";
var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
var DEFAULT_NG_VERSION = "1.6";

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

var webpackConfig = require('./webpack.config.js');
webpackConfig.devtool = 'inline-source-map';
var webpackConfig = module.exports = {
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.jsx', '.ts', '.tsx']
},

devtool: 'inline-source-map',

module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: { transpileOnly: true } }
]
},

stats: false,

plugins: [
new ForkTsCheckerWebpackPlugin(),
],

externals: [ 'angular' ]
};

module.exports = function(config) {
var ngVersion = config.ngversion || DEFAULT_NG_VERSION;
Expand Down
27 changes: 0 additions & 27 deletions webpack.config.js

This file was deleted.

0 comments on commit 1451c97

Please sign in to comment.