diff --git a/lib/loader.js b/lib/loader.js index 217d7bc3d..dfb1d2f04 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -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 = '' if (!isProduction && this.sourceMap && options.cssSourceMap !== false) {