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(