Skip to content

Commit 2628eae

Browse files
keven-wangHanks10100
authored andcommitted
use relative path to generate scope id instead of absolute path (#12)
1 parent 4e006fe commit 2628eae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = function (content) {
5656
var options = this.options.__vueOptions__ = Object.assign({}, this.options.vue, this.vue, query)
5757
var filePath = this.resourcePath
5858
var fileName = path.basename(filePath)
59-
var moduleId = 'data-v-' + genId(filePath)
59+
var moduleId = 'data-v-' + genId(path.relative(process.cwd(), filePath))
6060
var styleRewriter = styleRewriterPath + '?id=' + moduleId
6161

6262
var isProduction = this.minimize || process.env.NODE_ENV === 'production'

0 commit comments

Comments
 (0)