Skip to content

Commit

Permalink
fix: replace const keyword with var keyword in output (#283)
Browse files Browse the repository at this point in the history
Co-authored-by: Jesse Thomson <jesset@qualtrics.com>
  • Loading branch information
jessethomson and Jesse Thomson committed May 29, 2020
1 parent b17c15d commit a5fd035
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/postcss-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export default {
output +=
`var ${cssVariableName} = ${JSON.stringify(result.css)};\n` +
`export default ${module};\n` +
`export const stylesheet=${JSON.stringify(result.css)};`
`export var stylesheet=${JSON.stringify(result.css)};`
}

if (!shouldExtract && shouldInject) {
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ var _new = \\"style_new\\";
var _default = \\"style_default\\";
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\\";
var style = {\\"foo\\":\\"style_foo\\",\\"new\\":\\"style_new\\",\\"default\\":\\"style_default\\",\\"_new\\":\\"style_new\\",\\"_default\\":\\"style_default\\"};
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\\";
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\\";
styleInject(css_248z);
var style$1 = /*#__PURE__*/Object.freeze({
Expand Down Expand Up @@ -746,7 +746,7 @@ var newhacked = \\"style_new\\";
var defaulthacked = \\"style_default\\";
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\\";
var style = {\\"foo\\":\\"style_foo\\",\\"new\\":\\"style_new\\",\\"default\\":\\"style_default\\",\\"foohacked\\":\\"style_foo\\",\\"newhacked\\":\\"style_new\\",\\"defaulthacked\\":\\"style_default\\"};
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\\";
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\\";
styleInject(css_248z);
var style$1 = /*#__PURE__*/Object.freeze({
Expand Down

0 comments on commit a5fd035

Please sign in to comment.