Skip to content

Commit

Permalink
fix(karma-webpack): Fix publicPath to be Windows-compatible (#373)
Browse files Browse the repository at this point in the history
Fixes #362
  • Loading branch information
matthieu-foucault authored Nov 28, 2018
1 parent 432d139 commit fca13b9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/karma-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ function Plugin(
indexPath,
'/'
);
webpackOptions.output.publicPath = path.join(
'/',
'_karma_webpack_',
publicPath,
'/'
);
webpackOptions.output.publicPath = `/_karma_webpack_${publicPath}/`;

if (includeIndex) {
webpackOptions.output.jsonpFunction = `webpackJsonp${index}`;
Expand Down Expand Up @@ -230,7 +225,7 @@ function Plugin(
compiler.hooks.done.tap(this.plugin, done.bind(this));
compiler.hooks.invalid.tap(this.plugin, invalid.bind(this));

webpackMiddlewareOptions.publicPath = path.join('/', '_karma_webpack_', '/');
webpackMiddlewareOptions.publicPath = '/_karma_webpack_/';
const middleware = new WebpackDevMiddleware(
compiler,
webpackMiddlewareOptions
Expand Down

0 comments on commit fca13b9

Please sign in to comment.