I am evaluating NativeScript and have gone through the first spinning apple angular tutorial, tried out VS Code debugging and so far it is very solid. I took the spinning apple and added nativescript-dev-webpack webpack bundling to the app and tested out all the optimizations that are outlined in the excellent article found at http://docs.nativescript.org/angular/best-practices/bundling-with-webpack .
I am not sure if installing webpack based app bundling with npm install --save-dev nativescript-dev-webpack is a one-way street? So I wonder once I install and start using webpack to run and bundle a NativeScript app, do I have to stick with that exclusively or can I switch between using tns cli for debugging, and development, then go back to npm run with webpack for production builds and maybe performance testing etc…?
I suppose the answer is yes if you don’t make any specific modifications to the vendor*.ts files, or exclude those from tns run? The thing is without any changes to the spinning apple nativescript-dev-webpack installation, I can switch back and forth between running with npm run and tns run or VS Code, tns based launch.json invoked debugging.
If at any point going the webpack route takes you to the point of no return where you can no longer use tns cli, then I would think twice about making that move during a project’s development. The article did not mention anything about these issues, maybe the article can be updated with these issues or even if there is no problem to state that?
Maybe the tns cli could be modified to also work with the webpack bundling and allow for switching between webpack bundling and standard tns bundling which is a more opinionated approach? Comments or ideas on this?