Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #6 from dannsam/patch-1
Browse files Browse the repository at this point in the history
Use loaderUtils.stringifyRequest
shepherdwind authored May 17, 2017
2 parents 36836d6 + 6e8f7de commit 67dc8cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion loader.js
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ module.exports = function(content) {
return content + `
if(module.hot) {
// ${Date.now()}
const cssReload = require('${require.resolve('./hotModuleReplacement')}')(${JSON.stringify(options)});
const cssReload = require(${loaderUtils.stringifyRequest(this, require.resolve('./hotModuleReplacement'))})(${JSON.stringify(options)});
module.hot.dispose(cssReload);
module.hot.accept(undefined, cssReload);
}

0 comments on commit 67dc8cb

Please sign in to comment.