Skip to content

Commit

Permalink
fix: fix inconsistent hashes between Windows and POSIX systems (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkykh authored and yyx990803 committed Aug 13, 2018
1 parent 7672c18 commit cf8b6e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -18,7 +18,8 @@ module.exports.pitch = function (remainingRequest) {
var addStylesShadowPath = loaderUtils.stringifyRequest(this, '!' + path.join(__dirname, 'lib/addStylesShadow.js'))

var request = loaderUtils.stringifyRequest(this, '!!' + remainingRequest)
var id = JSON.stringify(hash(request + path.relative(__dirname, this.resourcePath)))
var relPath = path.relative(__dirname, this.resourcePath).replace(/\\/g, '/')
var id = JSON.stringify(hash(request + relPath))
var options = loaderUtils.getOptions(this) || {}

// direct css import from js --> direct, or manually call `styles.__inject__(ssrContext)` with `manualInject` option
Expand Down

0 comments on commit cf8b6e8

Please sign in to comment.