Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use file.originalPath instead of file.path #218

Merged
merged 1 commit into from
Oct 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/karma-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ Plugin.prototype.readFile = function(file, callback) {

function createPreprocesor(/* config.basePath */ basePath, webpackPlugin) {
return function(content, file, done) {
if (webpackPlugin.addFile(file.path)) {
if (webpackPlugin.addFile(file.originalPath)) {
// recompile as we have an asset that we have not seen before
webpackPlugin.middleware.invalidate()
}

// read blocks until bundle is done
webpackPlugin.readFile(path.relative(basePath, file.path), function(err, content) {
webpackPlugin.readFile(path.relative(basePath, file.originalPath), function(err, content) {
if (err) {
throw err
}
Expand Down