Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cc32542

Browse files
JounQinyyx990803
authored andcommittedJan 24, 2018
get relative path for this. resourcePath (#19)
`this.resourcePath` is an absolute path and will change in different devices, which will cause unexpected changes.
1 parent 3be5582 commit cc32542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports.pitch = function (remainingRequest) {
1818
var addStylesServerPath = loaderUtils.stringifyRequest(this, '!' + path.join(__dirname, 'lib/addStylesServer.js'))
1919

2020
var request = loaderUtils.stringifyRequest(this, '!!' + remainingRequest)
21-
var id = JSON.stringify(hash(request + this.resourcePath))
21+
var id = JSON.stringify(hash(request + path.relative(__dirname, this.resourcePath)))
2222
var options = loaderUtils.getOptions(this) || {}
2323

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

0 commit comments

Comments
 (0)
Please sign in to comment.