新建一个vue3+ts项目

2022-06-01  本文已影响0人  月下小酌_dbd5

方法一:vue 指令

vue create ol-vue3(项目名)
//是否使用类样式组件语法?
? Use class-style component syntax? (y/N) y
// 在TypeScript旁边使用Babel(现代模式、自动检测多边形填充、传输JSX所需)?(是/否)
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? (Y/n) y
// 路由器是否使用历史记录模式?(需要为生产中的索引回退进行正确的服务器设置)(是/否)
? Use history mode for router? (Requires proper server setup for index fallback in production) (Y/n)  n
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): 
  Sass/SCSS (with dart-sass)
  Sass/SCSS (with node-sass)
> Less
  Stylus
// 您希望将Babel、ESLint等的配置放在哪里。?
? Where do you prefer placing config for Babel, ESLint, etc.? 
  In dedicated config files//在专用配置文件中
> In package.json//在package.json文件
//是否将此保存为将来项目的预设?(是/否)
? Save this as a preset for future projects? (y/N) n
cd ol-vue3
npm run serve
image.png
image.png

方法二:使用 vue ui 命令来搭建

vue ui
上一篇 下一篇

猜你喜欢

热点阅读