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

Commit 78e398e

Browse files
chore(karma): inline webpack config, configure minimal webpack output
1 parent 3c6bb04 commit 78e398e

File tree

1 file changed

+23
-26
lines changed

1 file changed

+23
-26
lines changed

karma.conf.js

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,6 @@ function karmaServedFiles(ngVersion) {
3131
return angularFiles.concat('test/index.js');
3232
}
3333

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

@@ -96,9 +72,30 @@ module.exports = function(config) {
9672
require('karma-chrome-launcher')
9773
],
9874

99-
webpack: webpackConfig,
75+
webpack: {
76+
mode: 'development',
77+
resolve: {
78+
modules: ['node_modules'],
79+
extensions: ['.js', '.jsx', '.ts', '.tsx']
80+
},
81+
82+
devtool: 'inline-source-map',
83+
84+
module: {
85+
rules: [
86+
{ test: /\.tsx?$/, loader: 'ts-loader', options: { transpileOnly: true } }
87+
]
88+
},
89+
90+
plugins: [
91+
new ForkTsCheckerWebpackPlugin(),
92+
],
93+
94+
externals: [ 'angular' ]
95+
},
96+
10097
webpackMiddleware: {
101-
stats: { chunks: false },
98+
stats: 'minimal',
10299
},
103100

104101
/* Files *available to be served* by karma, i.e., anything that will be require()'d */

0 commit comments

Comments
 (0)