Skip to content

Commit

Permalink
fix: ensure consistent component id on different OS
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jul 18, 2018
1 parent 64a5cd3 commit 0766fe7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ module.exports = function (source) {
// module id for scoped CSS & hot-reload
const shortFilePath = path
.relative(context, resourcePath)
.replace(/^(\.\.[\\\/])+/, '') +
.replace(/\\/g, '/')
.replace(/^(\.\.\/)+/, '') +
resourceQuery

const id = hash(
Expand Down

0 comments on commit 0766fe7

Please sign in to comment.