vue3+vite+TS搭建项目

安装

npm安装方式

npm init vue@latest

pnpm安装方式(二选一)

pnpm create vue@latest

然后设置项目名称,接着选择自己需要的配置,安装完成
安装说明地址:https://cn.vuejs.org/guide/quick-start.html#creating-a-vue-application

安装sass

pnpm install sass

安装axios

pnpm install axios

配置

1.vue3 ts支持引入js文件的配置,修改tsconfig.json

"compilerOptions": {
    "allowJs": true,  //添加 编译时允许有js
    "allowSyntheticDefaultImports": true, //允许引用没有默认导出的模块
}
posted @ 2023-06-21 11:18  天宁哦  阅读(68)  评论(0)    收藏  举报