diff --git a/src/postcss-loader.js b/src/postcss-loader.js index 978e50b9..c0591c43 100644 --- a/src/postcss-loader.js +++ b/src/postcss-loader.js @@ -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) { diff --git a/test/__snapshots__/index.test.js.snap b/test/__snapshots__/index.test.js.snap index 35da34d2..47950e64 100644 --- a/test/__snapshots__/index.test.js.snap +++ b/test/__snapshots__/index.test.js.snap @@ -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({ @@ -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({