Skip to content

Commit

Permalink
feat(webpack): support chunks without errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mkawalec authored and joshwiens committed Jan 14, 2017
1 parent 2b18d78 commit 7334dbc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ function Plugin(
// When using an array, even of length 1, we want to include the index value for the build.
// This is due to the way that the dev server exposes commonPath for build output.
var indexPath = includeIndex ? index + "/" : "";
var publicPath = indexPath !== "" ? indexPath + '/' : "";

// Must have the common _karma_webpack_ prefix on path here to avoid
// https://github.com/webpack/webpack/issues/645
webpackOptions.output.path = "/_karma_webpack_/" + indexPath;
webpackOptions.output.publicPath = "/_karma_webpack_/" + indexPath + "/";
webpackOptions.output.publicPath = "/_karma_webpack_/" + publicPath;
webpackOptions.output.filename = "[name]";
if(includeIndex)
webpackOptions.output.jsonpFunction = "webpackJsonp" + index;
webpackOptions.output.chunkFilename = "[id].chunk.js";
webpackOptions.output.chunkFilename = "[id].bundle.js";
});

this.emitter = emitter;
Expand Down

0 comments on commit 7334dbc

Please sign in to comment.