共计 290 个字符,预计需要花费 1 分钟才能阅读完成。
参考文章 https://www.jianshu.com/p/bb4…
但是原文章是使用 typescript, 如果想用 es6. 只需要用 vite 创建项目即可, 用默认的 webpack 创建项目会报错.
# npm 6.x
npm init vite@latest my-vue-app --template vue
# npm 7+, 需要额外的双横线:npm init vite@latest my-vue-app -- --template vue
# yarn
yarn create vite my-vue-app --template vue
# pnpm
pnpm create vite my-vue-app -- --template vue
正文完