Skip to content

Commit 65fec5d

Browse files
committed
fix(karma-webpack): dont include the os.tmpdir in the webpack public path
1 parent 9ca87d4 commit 65fec5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/karma-webpack.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function Plugin(
6969
// Must have the common _karma_webpack_ prefix on path here to avoid
7070
// https://github.com/webpack/webpack/issues/645
7171
webpackOptions.output.path = path.join(os.tmpdir(), '_karma_webpack_', indexPath, '/')
72-
webpackOptions.output.publicPath = path.join(os.tmpdir(), '_karma_webpack_', publicPath, '/')
72+
webpackOptions.output.publicPath = path.join('/_karma_webpack_', publicPath, '/')
7373
webpackOptions.output.filename = '[name]'
7474
if (includeIndex) {
7575
webpackOptions.output.jsonpFunction = `webpackJsonp${index}`
@@ -197,7 +197,7 @@ function Plugin(
197197
compiler.plugin('invalid', invalid.bind(this))
198198
}
199199

200-
webpackMiddlewareOptions.publicPath = path.join(os.tmpdir(), '_karma_webpack_', '/')
200+
webpackMiddlewareOptions.publicPath = '/_karma_webpack_/'
201201
var middleware = this.middleware = new webpackDevMiddleware(compiler, webpackMiddlewareOptions)
202202

203203
customFileHandlers.push({

0 commit comments

Comments
 (0)