关于vue.js:vue-conf-2021-points

8次阅读

共计 629 个字符,预计需要花费 2 分钟才能阅读完成。

vue conf 2021 里我关怀的 points

Vue 3 生态停顿

  • vue router 稳固
  • vuex 稳固

开发体验改良

  • 构建工具 vite
  • SFC 语法
  • IDE/TS 反对

vite

  • 相似 vue-cli 的体验
  • 基于原生 ESM 的热更新
  • 基于 esbuild 的依赖预打包
  • 兼容 rollup 的插件机制
  • 内置 SSR 反对

VitePress

  • VuePress 的所有长处
  • Vite 的速度
  • 防止动态内容的 double payload 和 hydration 开销

编译阶段的优化

  • script setup
<template>
    <h1>{{msg}}</h1>
</template>

<script setup>
const msg = 'Hello World'
</script>
  • style 动静变量注入
<template>
    <h1>{{msg}}</h1>
</template>

<script setup>
import {ref} from 'vue'
  
const msg = 'Hello World'
const color = ref('red')
</script>

<style>
  h1 {color: v-bind(color)
  }
</style>

Vue Tools

  • Vue 2/3
  • Timeline 面板
  • 性能调试

IDE 反对打算

  • Vetur -> Volar
  • 官网的 vue-tsc 命令行类型查看
  • 提供其余编辑器的 LSP 整合

2.7

  • IE11 反对

3.1 和 3.2

  • Migration Build
  • Suspense

element 3

headless

  • Element core
  • Element style (Web GL)
正文完
 0