From 0766fe71814d3659b0e7b62edef92cd9a9e42024 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 17 Jul 2018 22:25:11 -0400 Subject: [PATCH] fix: ensure consistent component id on different OS ref: vuejs/vue-cli#1728 --- lib/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 1760b75ae..bfc1a637e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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(