Skip to content

cereschen/no-ref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published