Commit 0766fe71 authored by Evan You's avatar Evan You

fix: ensure consistent component id on different OS

ref: vuejs/vue-cli#1728
parent 64a5cd31
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment