Skip to content

Commit

Permalink
fix: locals export
Browse files Browse the repository at this point in the history
  • Loading branch information
cap-Bernardito committed May 24, 2021
1 parent d636b94 commit ae24e69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ="
Expand Down

0 comments on commit ae24e69

Please sign in to comment.