Steps to reproduce:
1. Create an angular app.
2. Try to package it for android & ios via CLI or after importing it to studio.
Actual result:
1. Packaging fails with:
[INFO] : WEBPACK WAIT Compiling ...
[INFO] : WEBPACK ERROR Failed to compile with 1 errors2:49:02 PM
[INFO] : WEBPACK
[INFO] : WEBPACK error in /Users/lchoudhary/Desktop/angtest2/src/main.aot.ts
[INFO] : WEBPACK Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
[INFO] : WEBPACK Error: /Users/lchoudhary/Desktop/angtest2/src/main.aot.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
[INFO] : WEBPACK at TitaniumAngularCompilerPlugin.getCompiledFile (/Users/lchoudhary/Desktop/angtest2/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:933:23)
[INFO] : WEBPACK at plugin.done.then (/Users/lchoudhary/Desktop/angtest2/node_modules/@ngtools/webpack/src/loader.js:41:31)
[INFO] : WEBPACK at process._tickCallback (internal/process/next_tick.js:68:7)
[INFO] : WEBPACK
[INFO] : WEBPACK @ multi ./src/main.aot.ts
[ERROR] : Error: Webpack compilation failed.
at WebpackService.handler (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/9.2.2.v20201015143748/cli/lib/webpack/service.js:240:20)
at WebpackService.emit (events.js:210:5)
at Subscription.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/9.2.2.v20201015143748/cli/lib/webpack/service.js:287:10)
at Subscription.emit (events.js:210:5)
at EventEmitter.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/9.2.2.v20201015143748/cli/lib/webpack/appcd.js:50:19)
at EventEmitter.emit (events.js:210:5)
at Object.handler (/Users/lchoudhary/.appcelerator/install/8.1.1/package/node_modules/appcd-client/dist/client.js:313:19)
at WebSocket.<anonymous> (/Users/lchoudhary/.appcelerator/install/8.1.1/package/node_modules/appcd-client/dist/client.js:126:31)
at WebSocket.emit (events.js:210:5)
at Receiver.receiverOnMessage (/Users/lchoudhary/.appcelerator/install/8.1.1/package/node_modules/appcd-client/node_modules/ws/lib/websocket.js:800:20)
Expected result:
1. The app is packaged successfully.
webpack-titanium-angular: https://github.com/appcelerator/titanium-webpack-devkit/pull/40 webpack-plugin-angular: https://github.com/appcelerator/webpack-plugin-angular/pull/26
Another follow up PR to update the Angular template in the SDK will follow after the other packages were successfully updated.
Both of those PRs merged. Packages need publishing and the SDK template updating
SDK template update: https://github.com/appcelerator/titanium_mobile/pull/12268
FR Passed. PR Merged.