Skip to content

Commit 56c0427

Browse files
refactor: export (#1106)
1 parent 88e86ab commit 56c0427

11 files changed

+1515
-1511
lines changed

src/utils.js

+15-20
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ function getModuleCode(
293293
esModule
294294
) {
295295
if (exportType !== 'full') {
296-
return '';
296+
return 'var ___CSS_LOADER_EXPORT___ = {};\n';
297297
}
298298

299299
const { css, map } = result;
@@ -303,18 +303,18 @@ function getModuleCode(
303303
let beforeCode = '';
304304

305305
beforeCode += esModule
306-
? `var exports = ___CSS_LOADER_API_IMPORT___(${sourceMap});\n`
307-
: `exports = ___CSS_LOADER_API_IMPORT___(${sourceMap});\n`;
306+
? `var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(${sourceMap});\n`
307+
: `___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(${sourceMap});\n`;
308308

309309
for (const item of apiImports) {
310310
const { type, media, dedupe } = item;
311311

312312
beforeCode +=
313313
type === 'internal'
314-
? `exports.i(${item.importName}${
314+
? `___CSS_LOADER_EXPORT___.i(${item.importName}${
315315
media ? `, ${JSON.stringify(media)}` : dedupe ? ', ""' : ''
316316
}${dedupe ? ', true' : ''});\n`
317-
: `exports.push([module.id, ${JSON.stringify(
317+
: `___CSS_LOADER_EXPORT___.push([module.id, ${JSON.stringify(
318318
`@import url(${item.url});`
319319
)}${media ? `, ${JSON.stringify(media)}` : ''}]);\n`;
320320
}
@@ -345,7 +345,7 @@ function getModuleCode(
345345
);
346346
}
347347

348-
return `${beforeCode}// Module\nexports.push([module.id, ${code}, ""${sourceMapValue}]);\n`;
348+
return `${beforeCode}// Module\n___CSS_LOADER_EXPORT___.push([module.id, ${code}, ""${sourceMapValue}]);\n`;
349349
}
350350

351351
function dashesCamelCase(str) {
@@ -412,25 +412,20 @@ function getExportCode(
412412
for (const replacement of icssReplacements) {
413413
const { replacementName, importName, localName } = replacement;
414414

415-
localsCode = localsCode.replace(new RegExp(replacementName, 'g'), () =>
416-
exportType === 'locals'
417-
? `" + ${importName}[${JSON.stringify(localName)}] + "`
418-
: `" + ${importName}.locals[${JSON.stringify(localName)}] + "`
415+
localsCode = localsCode.replace(
416+
new RegExp(replacementName, 'g'),
417+
() => `" + ${importName}.locals[${JSON.stringify(localName)}] + "`
419418
);
420419
}
421420

422-
if (exportType === 'locals') {
423-
code += `${esModule ? 'export default' : 'module.exports ='} ${
424-
localsCode ? `{\n${localsCode}\n}` : '{}'
425-
};\n`;
426-
} else {
427-
if (localsCode) {
428-
code += `exports.locals = {\n${localsCode}\n};\n`;
429-
}
430-
431-
code += `${esModule ? 'export default' : 'module.exports ='} exports;\n`;
421+
if (localsCode) {
422+
code += `___CSS_LOADER_EXPORT___.locals = {\n${localsCode}\n};\n`;
432423
}
433424

425+
code += `${
426+
esModule ? 'export default' : 'module.exports ='
427+
} ___CSS_LOADER_EXPORT___;\n`;
428+
434429
return `// Exports\n${code}`;
435430
}
436431

test/__snapshots__/esModule-option.test.js.snap

+26-26
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\");
88
var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\");
99
var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../../src/runtime/getUrl.js\\");
1010
var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./img.png\\");
11-
exports = ___CSS_LOADER_API_IMPORT___(false);
12-
exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
11+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
12+
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
1313
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
1414
// Module
15-
exports.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n.class {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
15+
___CSS_LOADER_EXPORT___.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n.class {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
1616
// Exports
17-
module.exports = exports;
17+
module.exports = ___CSS_LOADER_EXPORT___;
1818
"
1919
`;
2020

@@ -54,13 +54,13 @@ var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\");
5454
var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\");
5555
var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../../src/runtime/getUrl.js\\");
5656
var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./img.png\\");
57-
exports = ___CSS_LOADER_API_IMPORT___(false);
58-
exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
57+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
58+
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
5959
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
6060
// Module
61-
exports.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n.class {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
61+
___CSS_LOADER_EXPORT___.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n.class {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
6262
// Exports
63-
module.exports = exports;
63+
module.exports = ___CSS_LOADER_EXPORT___;
6464
"
6565
`;
6666

@@ -100,13 +100,13 @@ import ___CSS_LOADER_API_IMPORT___ from \\"../../../src/runtime/api.js\\";
100100
import ___CSS_LOADER_AT_RULE_IMPORT_0___ from \\"-!../../../src/index.js??[ident]!./imported.css\\";
101101
import ___CSS_LOADER_GET_URL_IMPORT___ from \\"../../../src/runtime/getUrl.js\\";
102102
import ___CSS_LOADER_URL_IMPORT_0___ from \\"./img.png\\";
103-
var exports = ___CSS_LOADER_API_IMPORT___(false);
104-
exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
103+
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
104+
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
105105
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
106106
// Module
107-
exports.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n.class {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
107+
___CSS_LOADER_EXPORT___.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n.class {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
108108
// Exports
109-
export default exports;
109+
export default ___CSS_LOADER_EXPORT___;
110110
"
111111
`;
112112

@@ -146,16 +146,16 @@ import ___CSS_LOADER_API_IMPORT___ from \\"../../../src/runtime/api.js\\";
146146
import ___CSS_LOADER_AT_RULE_IMPORT_0___ from \\"-!../../../src/index.js??[ident]!./imported.css\\";
147147
import ___CSS_LOADER_GET_URL_IMPORT___ from \\"../../../src/runtime/getUrl.js\\";
148148
import ___CSS_LOADER_URL_IMPORT_0___ from \\"./img.png\\";
149-
var exports = ___CSS_LOADER_API_IMPORT___(false);
150-
exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
149+
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
150+
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
151151
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
152152
// Module
153-
exports.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n._3S58jeCkC6SOPhVLbU-Bwn {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
153+
___CSS_LOADER_EXPORT___.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n._3S58jeCkC6SOPhVLbU-Bwn {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
154154
// Exports
155-
exports.locals = {
155+
___CSS_LOADER_EXPORT___.locals = {
156156
\\"class\\": \\"_3S58jeCkC6SOPhVLbU-Bwn\\"
157157
};
158-
export default exports;
158+
export default ___CSS_LOADER_EXPORT___;
159159
"
160160
`;
161161

@@ -195,16 +195,16 @@ import ___CSS_LOADER_API_IMPORT___ from \\"../../../src/runtime/api.js\\";
195195
import ___CSS_LOADER_AT_RULE_IMPORT_0___ from \\"-!../../../src/index.js??[ident]!./imported.css\\";
196196
import ___CSS_LOADER_GET_URL_IMPORT___ from \\"../../../src/runtime/getUrl.js\\";
197197
import ___CSS_LOADER_URL_IMPORT_0___ from \\"./img.png\\";
198-
var exports = ___CSS_LOADER_API_IMPORT___(false);
199-
exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
198+
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
199+
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
200200
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
201201
// Module
202-
exports.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n._3S58jeCkC6SOPhVLbU-Bwn {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
202+
___CSS_LOADER_EXPORT___.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n._3S58jeCkC6SOPhVLbU-Bwn {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
203203
// Exports
204-
exports.locals = {
204+
___CSS_LOADER_EXPORT___.locals = {
205205
\\"class\\": \\"_3S58jeCkC6SOPhVLbU-Bwn\\"
206206
};
207-
export default exports;
207+
export default ___CSS_LOADER_EXPORT___;
208208
"
209209
`;
210210

@@ -244,13 +244,13 @@ import ___CSS_LOADER_API_IMPORT___ from \\"../../../src/runtime/api.js\\";
244244
import ___CSS_LOADER_AT_RULE_IMPORT_0___ from \\"-!../../../src/index.js??[ident]!./imported.css\\";
245245
import ___CSS_LOADER_GET_URL_IMPORT___ from \\"../../../src/runtime/getUrl.js\\";
246246
import ___CSS_LOADER_URL_IMPORT_0___ from \\"./img.png\\";
247-
var exports = ___CSS_LOADER_API_IMPORT___(false);
248-
exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
247+
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
248+
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);
249249
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
250250
// Module
251-
exports.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n.class {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
251+
___CSS_LOADER_EXPORT___.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */\\\\n\\\\n.class {\\\\n color: red;\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\", \\"\\"]);
252252
// Exports
253-
export default exports;
253+
export default ___CSS_LOADER_EXPORT___;
254254
"
255255
`;
256256

test/__snapshots__/icss.test.js.snap

+40-40
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ exports[`ICSS show work with the case "duplicate-export": errors 1`] = `Array []
55
exports[`ICSS show work with the case "duplicate-export": module 1`] = `
66
"// Imports
77
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
8-
exports = ___CSS_LOADER_API_IMPORT___(false);
8+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
99
// Module
10-
exports.push([module.id, \\"\\\\n\\", \\"\\"]);
10+
___CSS_LOADER_EXPORT___.push([module.id, \\"\\\\n\\", \\"\\"]);
1111
// Exports
12-
exports.locals = {
12+
___CSS_LOADER_EXPORT___.locals = {
1313
\\"_test\\": \\"_right_value\\"
1414
};
15-
module.exports = exports;
15+
module.exports = ___CSS_LOADER_EXPORT___;
1616
"
1717
`;
1818

@@ -34,14 +34,14 @@ exports[`ICSS show work with the case "duplicate-export-in-multiple-export": err
3434
exports[`ICSS show work with the case "duplicate-export-in-multiple-export": module 1`] = `
3535
"// Imports
3636
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
37-
exports = ___CSS_LOADER_API_IMPORT___(false);
37+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
3838
// Module
39-
exports.push([module.id, \\"\\\\n\\", \\"\\"]);
39+
___CSS_LOADER_EXPORT___.push([module.id, \\"\\\\n\\", \\"\\"]);
4040
// Exports
41-
exports.locals = {
41+
___CSS_LOADER_EXPORT___.locals = {
4242
\\"_test\\": \\"_right_value\\"
4343
};
44-
module.exports = exports;
44+
module.exports = ___CSS_LOADER_EXPORT___;
4545
"
4646
`;
4747

@@ -63,11 +63,11 @@ exports[`ICSS show work with the case "empty-export": errors 1`] = `Array []`;
6363
exports[`ICSS show work with the case "empty-export": module 1`] = `
6464
"// Imports
6565
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
66-
exports = ___CSS_LOADER_API_IMPORT___(false);
66+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
6767
// Module
68-
exports.push([module.id, \\"\\\\n\\", \\"\\"]);
68+
___CSS_LOADER_EXPORT___.push([module.id, \\"\\\\n\\", \\"\\"]);
6969
// Exports
70-
module.exports = exports;
70+
module.exports = ___CSS_LOADER_EXPORT___;
7171
"
7272
`;
7373

@@ -89,11 +89,11 @@ exports[`ICSS show work with the case "empty-import": errors 1`] = `Array []`;
8989
exports[`ICSS show work with the case "empty-import": module 1`] = `
9090
"// Imports
9191
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
92-
exports = ___CSS_LOADER_API_IMPORT___(false);
92+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
9393
// Module
94-
exports.push([module.id, \\"\\\\n\\", \\"\\"]);
94+
___CSS_LOADER_EXPORT___.push([module.id, \\"\\\\n\\", \\"\\"]);
9595
// Exports
96-
module.exports = exports;
96+
module.exports = ___CSS_LOADER_EXPORT___;
9797
"
9898
`;
9999

@@ -115,14 +115,14 @@ exports[`ICSS show work with the case "export": errors 1`] = `Array []`;
115115
exports[`ICSS show work with the case "export": module 1`] = `
116116
"// Imports
117117
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
118-
exports = ___CSS_LOADER_API_IMPORT___(false);
118+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
119119
// Module
120-
exports.push([module.id, \\"\\\\n\\", \\"\\"]);
120+
___CSS_LOADER_EXPORT___.push([module.id, \\"\\\\n\\", \\"\\"]);
121121
// Exports
122-
exports.locals = {
122+
___CSS_LOADER_EXPORT___.locals = {
123123
\\"_test\\": \\"_test\\"
124124
};
125-
module.exports = exports;
125+
module.exports = ___CSS_LOADER_EXPORT___;
126126
"
127127
`;
128128

@@ -144,15 +144,15 @@ exports[`ICSS show work with the case "export-reserved-keywords": errors 1`] = `
144144
exports[`ICSS show work with the case "export-reserved-keywords": module 1`] = `
145145
"// Imports
146146
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
147-
exports = ___CSS_LOADER_API_IMPORT___(false);
147+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
148148
// Module
149-
exports.push([module.id, \\"\\\\n\\", \\"\\"]);
149+
___CSS_LOADER_EXPORT___.push([module.id, \\"\\\\n\\", \\"\\"]);
150150
// Exports
151-
exports.locals = {
151+
___CSS_LOADER_EXPORT___.locals = {
152152
\\"constructor\\": \\"constructor\\",
153153
\\"toString\\": \\"toString\\"
154154
};
155-
module.exports = exports;
155+
module.exports = ___CSS_LOADER_EXPORT___;
156156
"
157157
`;
158158

@@ -175,15 +175,15 @@ exports[`ICSS show work with the case "import": module 1`] = `
175175
"// Imports
176176
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
177177
var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./vars.css\\");
178-
exports = ___CSS_LOADER_API_IMPORT___(false);
179-
exports.i(___CSS_LOADER_ICSS_IMPORT_0___, \\"\\", true);
178+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
179+
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_ICSS_IMPORT_0___, \\"\\", true);
180180
// Module
181-
exports.push([module.id, \\".className {\\\\n color: \\" + ___CSS_LOADER_ICSS_IMPORT_0___.locals[\\"primary-color\\"] + \\";\\\\n}\\\\n\\", \\"\\"]);
181+
___CSS_LOADER_EXPORT___.push([module.id, \\".className {\\\\n color: \\" + ___CSS_LOADER_ICSS_IMPORT_0___.locals[\\"primary-color\\"] + \\";\\\\n}\\\\n\\", \\"\\"]);
182182
// Exports
183-
exports.locals = {
183+
___CSS_LOADER_EXPORT___.locals = {
184184
\\"primary-color\\": \\"\\" + ___CSS_LOADER_ICSS_IMPORT_0___.locals[\\"primary-color\\"] + \\"\\"
185185
};
186-
module.exports = exports;
186+
module.exports = ___CSS_LOADER_EXPORT___;
187187
"
188188
`;
189189

@@ -214,16 +214,16 @@ exports[`ICSS show work with the case "import-reserved-keywords": module 1`] = `
214214
"// Imports
215215
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
216216
var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./vars.css\\");
217-
exports = ___CSS_LOADER_API_IMPORT___(false);
218-
exports.i(___CSS_LOADER_ICSS_IMPORT_0___, \\"\\", true);
217+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
218+
___CSS_LOADER_EXPORT___.i(___CSS_LOADER_ICSS_IMPORT_0___, \\"\\", true);
219219
// Module
220-
exports.push([module.id, \\".className {\\\\n color: \\" + ___CSS_LOADER_ICSS_IMPORT_0___.locals[\\"primary-color\\"] + \\";\\\\n display: \\" + ___CSS_LOADER_ICSS_IMPORT_0___.locals[\\"secondary-color\\"] + \\";\\\\n}\\\\n\\", \\"\\"]);
220+
___CSS_LOADER_EXPORT___.push([module.id, \\".className {\\\\n color: \\" + ___CSS_LOADER_ICSS_IMPORT_0___.locals[\\"primary-color\\"] + \\";\\\\n display: \\" + ___CSS_LOADER_ICSS_IMPORT_0___.locals[\\"secondary-color\\"] + \\";\\\\n}\\\\n\\", \\"\\"]);
221221
// Exports
222-
exports.locals = {
222+
___CSS_LOADER_EXPORT___.locals = {
223223
\\"primary-color\\": \\"\\" + ___CSS_LOADER_ICSS_IMPORT_0___.locals[\\"primary-color\\"] + \\"\\",
224224
\\"secondary-color\\": \\"\\" + ___CSS_LOADER_ICSS_IMPORT_0___.locals[\\"secondary-color\\"] + \\"\\"
225225
};
226-
module.exports = exports;
226+
module.exports = ___CSS_LOADER_EXPORT___;
227227
"
228228
`;
229229

@@ -254,15 +254,15 @@ exports[`ICSS show work with the case "multiple-export": errors 1`] = `Array []`
254254
exports[`ICSS show work with the case "multiple-export": module 1`] = `
255255
"// Imports
256256
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
257-
exports = ___CSS_LOADER_API_IMPORT___(false);
257+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
258258
// Module
259-
exports.push([module.id, \\"\\\\n\\", \\"\\"]);
259+
___CSS_LOADER_EXPORT___.push([module.id, \\"\\\\n\\", \\"\\"]);
260260
// Exports
261-
exports.locals = {
261+
___CSS_LOADER_EXPORT___.locals = {
262262
\\"_test\\": \\"_test\\",
263263
\\"_foo\\": \\"_bar\\"
264264
};
265-
module.exports = exports;
265+
module.exports = ___CSS_LOADER_EXPORT___;
266266
"
267267
`;
268268

@@ -284,18 +284,18 @@ exports[`ICSS show work with the case "multiple-keys-values-in-export": errors 1
284284
exports[`ICSS show work with the case "multiple-keys-values-in-export": module 1`] = `
285285
"// Imports
286286
var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\");
287-
exports = ___CSS_LOADER_API_IMPORT___(false);
287+
___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
288288
// Module
289-
exports.push([module.id, \\"\\\\n\\", \\"\\"]);
289+
___CSS_LOADER_EXPORT___.push([module.id, \\"\\\\n\\", \\"\\"]);
290290
// Exports
291-
exports.locals = {
291+
___CSS_LOADER_EXPORT___.locals = {
292292
\\"_test\\": \\"_test\\",
293293
\\"_test1\\": \\"1\\",
294294
\\"_test2\\": \\"'string'\\",
295295
\\"_test3\\": \\"1px 2px 3px\\",
296296
\\"_test4\\": \\"1px 2px 3px, 1px 2px 3px\\"
297297
};
298-
module.exports = exports;
298+
module.exports = ___CSS_LOADER_EXPORT___;
299299
"
300300
`;
301301

0 commit comments

Comments
 (0)