Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not use useCssVars #270

Closed
5 tasks done
max512060925 opened this issue Feb 16, 2023 · 3 comments
Closed
5 tasks done

can not use useCssVars #270

max512060925 opened this issue Feb 16, 2023 · 3 comments
Labels

Comments

@max512060925
Copy link

Describe the bug

when I use @vue-macros/reactivity-transform
useCssVars not effective

<template>
  <div class="test">test</div>
</template>
<script setup>
let background = $ref('red')
</script>
<style>
#app {
  width: 100%;
  height: 100%;
}
.test {
  width: 100%;
  height: 100%;
  background: v-bind(background);
}
</style>

console warn useCssVars is called without current active component instance

import { defineConfig } from 'vite'
import ReactivityTransform from '@vue-macros/reactivity-transform/vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/

export default defineConfig({
  plugins: [ReactivityTransform(), vue()],
  server: {
    host: '0.0.0.0',
    port: 9900,
    open: true,
    hmr: true,
  },
})

123

Reproduction

0.2.2

System Info

Mac OS 13.2.1 Chrome 109.0.5414.119

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@sxzz sxzz added the upstream label Feb 16, 2023
@max512060925
Copy link
Author

max512060925 commented Feb 21, 2023

vuejs/core#7759

@sxzz
Copy link
Member

sxzz commented Feb 23, 2023

Let's track the vue-core issue instead.

@sxzz sxzz closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2023
@max512060925 max512060925 mentioned this issue May 5, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants