Skip to content

Commit f5ceb4b

Browse files
committed
How karma can rebuild
1 parent 92544d6 commit f5ceb4b

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"karma-firefox-launcher": "^1.0.1",
4242
"karma-ie-launcher": "^1.0.0",
4343
"karma-jasmine": "^1.1.0",
44+
"karma-webpack": "^2.0.6",
4445
"webpack": "^3.8.1"
4546
},
4647
"keywords": [

test/config/karma.conf.js

+15-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,20 @@ module.exports = function (config) {
1111

1212
frameworks: ['jasmine'],
1313

14-
files: require('./karma.conf.files.js')[ENV],
14+
files: [
15+
...require('./karma.conf.files.js')[ENV],
16+
{
17+
pattern: '../../src/*.js',
18+
watched: true,
19+
served: false
20+
}
21+
],
22+
23+
preprocessors: {
24+
'../../src/*.js': ['webpack']
25+
},
26+
27+
webpack: {},
1528

1629
exclude: [],
1730

@@ -35,6 +48,6 @@ module.exports = function (config) {
3548

3649
singleRun: ENV !== 'development',
3750

38-
restartOnFileChange: true
51+
// restartOnFileChange: true
3952
});
4053
};

0 commit comments

Comments
 (0)