본문 바로가기

프로그래밍/개발메모

vue reactivityTransform $ref 사용할수 없을때 / '$ref' not defined

출처: https://vueshowcase.com/question/vue-reactivity-transform-ref-not-defined

 

vue reactivity transform $ref not defined

 

vueshowcase.com

이 글을 보고 해결하였습니다. vite 필요한건 아니고
eslint 가 방해하는거 였군요

 

// .eslintrc.js
module.exports = {
  // (생략)
  globals: {
    $ref: "readonly",
    $computed: "readonly",
    $shallowRef: "readonly",
    $customRef: "readonly",
    $toRef: "readonly",
  },
};

global 변수 등록 해서 해결했습니다..