Skip to content

Commit fdbe0e6

Browse files
authoredAug 25, 2017
fix($loader): handle weird edge case when using vue-loader
1 parent 6befee5 commit fdbe0e6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎loader.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ module.exports = function(source) {
1919

2020
// We need to always require hotModuleReplacement.js for HMR to work in a wierd scenario
2121
// where only one css file is imported. Otherwise HMR breaks when modules are disposed.
22-
return `${source}
23-
require(${loaderUtils.stringifyRequest(this, path.join(__dirname, "hotModuleReplacement.js"))})`;
22+
return `
23+
require(${loaderUtils.stringifyRequest(this, path.join(__dirname, "hotModuleReplacement.js"))})
24+
${source}`;
2425
};
2526

27+
2628
module.exports.pitch = function(request) {
2729
var self = this;
2830
var remainingRequest = request;

0 commit comments

Comments
 (0)
Please sign in to comment.