We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9dc1ad commit 139104bCopy full SHA for 139104b
packages/compiler-sfc/__tests__/cssVars.spec.ts
@@ -255,5 +255,22 @@ describe('CSS vars injection', () => {
255
)
256
expect(cssVars).toMatchObject([`count.toString(`, `xxx`])
257
})
258
+
259
+ // #7759
260
+ test('It should correctly parse the case where there is no space after the script tag', () => {
261
+ const { content } = compileSFCScript(
262
+ `<script setup>import { ref as _ref } from 'vue';
263
+ let background = _ref('red')
264
+ </script>
265
+ <style>
266
+ label {
267
+ background: v-bind(background);
268
+ }
269
+ </style>`
270
+ )
271
+ expect(content).toMatch(
272
+ `export default {\n setup(__props, { expose }) {\n expose();\n\n_useCssVars(_ctx => ({\n "xxxxxxxx-background": (_unref(background))\n}))`
273
274
+ })
275
276
0 commit comments