From fca13b924881e8a6d1527e6e6ffd3037ed436045 Mon Sep 17 00:00:00 2001 From: Matthieu Foucault Date: Wed, 28 Nov 2018 07:44:24 -0800 Subject: [PATCH] fix(karma-webpack): Fix publicPath to be Windows-compatible (#373) Fixes #362 --- src/karma-webpack.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/karma-webpack.js b/src/karma-webpack.js index 650b25b..a46148e 100644 --- a/src/karma-webpack.js +++ b/src/karma-webpack.js @@ -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}`; @@ -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