记录--Uniapp + TypeScript 配置文档
{
"name": "uni-app-typescript-example",
"version": "1.0.0",
"scripts": {
"dev": "cross-env UNI_PLATFORM=h5 vue-cli-service uni-build --watch",
"build": "cross-env UNI_PLATFORM=h5 vue-cli-service uni-build"
},
"dependencies": {
"vue": "^2.6.11",
"uni-simple-router": "^2.4.3",
"uni-simple-store": "^2.4.3",
"@dcloudio/types": "^2.0.5",
"@types/node": "^14.14.25",
"typescript": "^4.0.5"
},
"devDependencies": {
"@vue/cli-service": "^4.5.15",
"@vue/cli-plugin-typescript": "^4.5.15",
"cross-env": "^7.0.3"
}
}
这个配置文件定义了一个使用uni-app和TypeScript的项目。它指定了项目的名称和版本,并定义了用于开发和构建的脚本。同时,它列出了所需的npm依赖项,包括uni-app的核心库、uni-simple-router和uni-simple-store,以及TypeScript的类型定义。这为开发者提供了一个基本的配置框架,可以根据具体需求进行扩展和定制。
评论已关闭