GithubHelp home page GithubHelp logo

write-vue's Introduction

Vue 3

手写 vue, 跟着 B 站的视频敲的 vue 源码,提交代码也是对自己的一个监督,大家一起加油!

项目里面的一些安装包版本与视频里老师用的不一样,注意版本问题,太高版本的会有一些语法错误,目前的 vue 源码也升级了,可以下载一个, 写的时候对照看

我写的时候本地的一些版本信息: node v18.18.0 npm 10.2.0

项目启动打包会报一个错,

package subpath './package.json' is not defined by "exports" in D:\githupprojects\study\vue3-write\node_modules\tslib\package.json

是因为 nodemodules 下面的 tslib 包问题,在 package.json 文件的 exports 对象,最后一行添加 "./": "./*" 就可以了 完整的 exports 代码

"exports": {
        ".": {
            "module": "./tslib.es6.js",
            "import": "./modules/index.js",
            "default": "./tslib.js"
        },
        "./": "./",
        "./*": "./*"
    }

尝试换了版本,但是会报其他错误, 所以版本不同可能会出现不同问题

实现模块列表:

  1. reactive
  2. effect
  3. ref
  4. toRef
  5. toRefs
  6. computed
  7. createApp
  8. apilifecycle

write-vue's People

Contributors

shengbid avatar

Stargazers

 avatar games.gong avatar guanghuiLuo avatar LiuHaHa avatar  avatar  avatar 黎宣平 avatar  avatar  avatar  avatar Caleb Rachlin avatar 吴鑫海 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.