forked from ultimatecourses/ngrx-store-effects-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
executable file
·46 lines (45 loc) · 1.12 KB
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const webpack = require('webpack');
module.exports = config => {
config.set({
browsers: ['Chrome'],
files: ['./node_modules/es6-shim/es6-shim.min.js', 'karma.entry.js'],
frameworks: ['jasmine'],
mime: { 'text/x-typescript': ['ts'] },
preprocessors: {
'karma.entry.js': ['webpack', 'sourcemap'],
'*.js': ['sourcemap'],
'**/*.spec.ts': ['sourcemap', 'webpack'],
},
reporters: ['spec'],
webpack: {
context: __dirname,
devtool: 'sourcemap',
module: {
rules: [
{
test: /\.html$/,
loaders: ['raw-loader'],
},
{
test: /\.scss$/,
loaders: ['raw-loader', 'sass-loader'],
},
{
test: /\.ts$/,
loaders: ['awesome-typescript-loader', 'angular2-template-loader'],
},
],
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.SourceMapDevToolPlugin({
filename: null,
test: /\.(ts|js)($|\?)/i,
}),
],
resolve: {
extensions: ['.ts', '.js'],
},
},
});
};