Skip to content

Latest commit

 

History

History
59 lines (47 loc) · 820 Bytes

README.md

File metadata and controls

59 lines (47 loc) · 820 Bytes

no-ref

This plugin lets you no logger write ref() and .value

Usage

npm i no-ref -D

yarn add no-ref -D

vite

// vite.config.js

import { createNoRefVite } from "no-ref"

 module.exports = {
  plugins : [createNoRefVite()],
  ...
}

webpack

// vue.config.js
module.exports = {
 chainWebpack(config) {
    config.module
    .rule('vue')
    .use('no-ref')
    .loader('no-ref')
    .end()
  }
}

FAQ

How to ignore

// useRange.js
 export function useRange(){
   const start = ref(5)
   const end =ref (15)
   const width = ref(10)

   return { start, end, width }
 } 
 const { start/**use-ref*/, end, width } = useRange()

 start.value++  // start.value = 6
 (end).value++  // end.value = 16
 console.log(width) // 10

Todo

support computed