Skip to content

Commit a5fd035

Browse files
jessethomsonJesse Thomson
and
Jesse Thomson
authored
fix: replace const keyword with var keyword in output (#283)
Co-authored-by: Jesse Thomson <[email protected]>
1 parent b17c15d commit a5fd035

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/postcss-loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export default {
196196
output +=
197197
`var ${cssVariableName} = ${JSON.stringify(result.css)};\n` +
198198
`export default ${module};\n` +
199-
`export const stylesheet=${JSON.stringify(result.css)};`
199+
`export var stylesheet=${JSON.stringify(result.css)};`
200200
}
201201

202202
if (!shouldExtract && shouldInject) {

test/__snapshots__/index.test.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ var _new = \\"style_new\\";
695695
var _default = \\"style_default\\";
696696
var css_248z = \\".style_foo {\\\\n color: red;\\\\n}\\\\n\\\\n.style_new {\\\\n color: blue;\\\\n}\\\\n\\\\n.style_default {\\\\n color: green;\\\\n}\\\\n\\";
697697
var style = {\\"foo\\":\\"style_foo\\",\\"new\\":\\"style_new\\",\\"default\\":\\"style_default\\",\\"_new\\":\\"style_new\\",\\"_default\\":\\"style_default\\"};
698-
const stylesheet=\\".style_foo {\\\\n color: red;\\\\n}\\\\n\\\\n.style_new {\\\\n color: blue;\\\\n}\\\\n\\\\n.style_default {\\\\n color: green;\\\\n}\\\\n\\";
698+
var stylesheet=\\".style_foo {\\\\n color: red;\\\\n}\\\\n\\\\n.style_new {\\\\n color: blue;\\\\n}\\\\n\\\\n.style_default {\\\\n color: green;\\\\n}\\\\n\\";
699699
styleInject(css_248z);
700700
701701
var style$1 = /*#__PURE__*/Object.freeze({
@@ -746,7 +746,7 @@ var newhacked = \\"style_new\\";
746746
var defaulthacked = \\"style_default\\";
747747
var css_248z = \\".style_foo {\\\\n color: red;\\\\n}\\\\n\\\\n.style_new {\\\\n color: blue;\\\\n}\\\\n\\\\n.style_default {\\\\n color: green;\\\\n}\\\\n\\";
748748
var style = {\\"foo\\":\\"style_foo\\",\\"new\\":\\"style_new\\",\\"default\\":\\"style_default\\",\\"foohacked\\":\\"style_foo\\",\\"newhacked\\":\\"style_new\\",\\"defaulthacked\\":\\"style_default\\"};
749-
const stylesheet=\\".style_foo {\\\\n color: red;\\\\n}\\\\n\\\\n.style_new {\\\\n color: blue;\\\\n}\\\\n\\\\n.style_default {\\\\n color: green;\\\\n}\\\\n\\";
749+
var stylesheet=\\".style_foo {\\\\n color: red;\\\\n}\\\\n\\\\n.style_new {\\\\n color: blue;\\\\n}\\\\n\\\\n.style_default {\\\\n color: green;\\\\n}\\\\n\\";
750750
styleInject(css_248z);
751751
752752
var style$1 = /*#__PURE__*/Object.freeze({

0 commit comments

Comments
 (0)