【发布时间】:2021-07-18 09:40:45
【问题描述】:
当我执行 tns prepare ios 时,我不断收到此错误。 我觉得它以前可以工作,但在某些时候,它停止工作并抛出该错误消息。 似乎它正在寻找加载器,但我不确定如何配置它。 有什么想法吗?
这是我的 webpack.config.js
module.exports = (env) => {
webpack.init(env);
// Learn how to customize:
// https://docs.nativescript.org/webpack
return webpack.resolveConfig();
};
这是我的 pakage.json
"name": "@nativescript/template-hello-world-ng",
"main": "src/main.ts",
"version": "8.0.5",
"author": "NativeScript Team <oss@nativescript.org>",
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"publishConfig": {
"access": "public"
},
"files": [
"App_Resources",
"hooks",
"src",
"tools",
"!tools/assets",
".editorconfig",
"references.d.ts",
"tsconfig.json"
],
"keywords": [
"nativescript",
"mobile",
"angular",
"{N}",
"template"
],
"repository": "<fill-your-repository-here>",
"bugs": {
"url": "https://github.com/NativeScript/NativeScript/issues"
},
"dependencies": {
"@angular/animations": "^11.2.11",
"@angular/common": "^11.2.11",
"@angular/compiler": "^11.2.11",
"@angular/core": "^11.2.11",
"@angular/forms": "^11.2.11",
"@angular/platform-browser": "^11.2.11",
"@angular/platform-browser-dynamic": "^11.2.11",
"@angular/router": "^11.2.11",
"@nativescript/angular": "~11.8.0",
"@nativescript/core": "^8.0.2",
"@nativescript/theme": "~3.0.1",
"@nstudio/nativescript-snackbar": "^2.1.0",
"nativescript-clipboard": "^2.1.1",
"reflect-metadata": "~0.1.13",
"rxjs": "~6.6.7",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular/compiler-cli": "^11.2.11",
"@nativescript/ios": "8.0.0",
"@nativescript/types": "^8.0.1",
"@nativescript/webpack": "beta",
"@ngtools/webpack": "^11.2.10",
"typescript": "~4.0.0"
},
"private": "true",
"readme": "NativeScript Application",
"scripts": {
"ip11": "tns run ios --device 'iPhone 11'"
}
}
这是我的 tsconfig.json
"compilerOptions": {
"module": "esnext",
"target": "es2017",
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
"skipLibCheck": true,
"lib": ["es2017", "dom"],
"baseUrl": ".",
"paths": {
"~/*": ["src/*"],
"@/*": ["src/*"]
}
},
"include": ["src/tests/**/*.ts", "src/**/*.ios.ts", "src/**/*.android.ts"],
"files": ["./src/main.ts", "./references.d.ts"],
"exclude": ["node_modules", "platforms", "e2e"]
}
【问题讨论】:
标签: typescript webpack nativescript loader