From ae24e69c8b6fead78cf3da884c80db77644660c1 Mon Sep 17 00:00:00 2001 From: cap-Bernardito Date: Mon, 24 May 2021 16:37:09 +0300 Subject: [PATCH] fix: locals export --- src/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.js b/src/utils.js index 491d486c..e1a819ad 100644 --- a/src/utils.js +++ b/src/utils.js @@ -869,9 +869,9 @@ function getExportCode(exports, replacements, options) { code += options.modules.namedExport ? localsCode - : localsCode - ? `___CSS_LOADER_EXPORT___.locals = {\n${localsCode}\n};\n` - : `___CSS_LOADER_EXPORT___.locals = {};\n`; + : `___CSS_LOADER_EXPORT___.locals = {${ + localsCode ? `\n${localsCode}\n` : "" + }};\n`; code += `${ options.esModule ? "export default" : "module.exports ="