tns --版本:4.1.0
tns 创建演示 --ng
为 nativescript-webpack 更新 package.json
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.test",
"tns-android": {
"version": "4.1.3"
}
},
"dependencies": {
"@angular/animations": "~6.0.6",
"@angular/common": "~6.0.6",
"@angular/compiler": "~6.0.6",
"@angular/core": "~6.0.6",
"@angular/forms": "~6.0.6",
"@angular/http": "~6.0.6",
"@angular/platform-browser": "~6.0.6",
"@angular/platform-browser-dynamic": "~6.0.6",
"@angular/router": "~6.0.6",
"nativescript-angular": "~6.0.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.0.0 || >=6.1.0",
"tns-core-modules": "~4.1.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.7.0-rc.0",
"@angular/compiler-cli": "~6.1.0-beta.1",
"@ngtools/webpack": "^6.0.8",
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"clean-webpack-plugin": "~0.1.19",
"copy-webpack-plugin": "~4.5.2",
"lazy": "1.0.11",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "^0.14.2",
"tns-platform-declarations": "^4.1.0",
"typescript": "~2.7.2",
"webpack-bundle-analyzer": "^2.13.1"
}
}
./node_modules/.bin/update-ns-webpack --configs
tns 构建 android --bundle
出现很多错误,如下:
../node_modules/tns-core-modules/bundle-entry-points.js 中的错误模块未找到:错误:无法解析“ui/button”