File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ diff --git a/node_modules/karma-webpack/lib/webpack/plugin.js b/node_modules/karma-webpack/lib/webpack/plugin.js
2
+ index 47b993c..3b75a9e 100644
3
+ --- a/node_modules/karma-webpack/lib/webpack/plugin.js
4
+ +++ b/node_modules/karma-webpack/lib/webpack/plugin.js
5
+ @@ -1,4 +1,5 @@
6
+ const fs = require('fs');
7
+ + const path = require('path');
8
+
9
+ class KW_WebpackPlugin {
10
+ constructor(options) {
11
+ @@ -14,9 +15,10 @@ class KW_WebpackPlugin {
12
+ // read generated file content and store for karma preprocessor
13
+ this.controller.bundlesContent = {};
14
+ stats.toJson().assets.forEach((webpackFileObj) => {
15
+ - const filePath = `${compiler.options.output.path}/${
16
+ + const filePath = path.resolve(
17
+ + compiler.options.output.path,
18
+ webpackFileObj.name
19
+ - }`;
20
+ + );
21
+ this.controller.bundlesContent[webpackFileObj.name] = fs.readFileSync(
22
+ filePath,
23
+ 'utf-8'
You can’t perform that action at this time.
0 commit comments