Skip to content

Commit

Permalink
fix: avoid hash collision in prod by including both filepath and cont…
Browse files Browse the repository at this point in the history
…ent (#1086)
  • Loading branch information
Jinjiang authored and yyx990803 committed Dec 15, 2017
1 parent ecea3c3 commit b526349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = function (content) {
process.cwd()
const sourceRoot = path.dirname(path.relative(context, filePath))
const shortFilePath = path.relative(context, filePath).replace(/^(\.\.[\\\/])+/, '')
const moduleId = 'data-v-' + hash(isProduction ? content : shortFilePath)
const moduleId = 'data-v-' + hash(isProduction ? (shortFilePath + '\n' + content) : shortFilePath)

let cssLoaderOptions = ''
const cssSourceMap =
Expand Down

0 comments on commit b526349

Please sign in to comment.