On iPhone 5 about 50ms of 980ms of the startup time of the Cuteness sample (and similar on Android) is spent for requiring JavaScript modules.
This could be reduced if we combine (and optionally minify) all used JavaScript modules in release build.
This could be somehow related to the transpilers support #493
Maybe we can work with @mishoo and use the excellent Uglify.js lib?
The problem seems to come from how page.xml code behind is managed.
From my test, it seems page.xml needs page.js (ie page.css) to find methods...
So the limitation is how to tell page.xml where to get navigatedTo for example.
Something like this:
< Page codeFile="path/to/the/bundlefile.js" codeClass="Mynamespace.Myclass" navigatedTo="pageNavigatedTo" />
or:
< Page codeFile="path/to/the/bundlefile.js" navigatedTo="Mynamespace.Myclass.pageNavigatedTo" />
For now, I'm unable to use this kind of folder structure in my app:
this could solve my problem too.
This can probably negativly reflect on how you debug and/or/when get error reports from production apps
Source Maps, Source Maps everywhere... We need to support these for obfuscators, transpilers etc.
Meanwhile we've spent some time profiling the app and improved our caching.
XML code-behind will be interesting, source maps won't handle that easily. They map the location in the generated JavaScript to the original source, however for the XMLs we will need a mapping that works the other way around.
This is now possible with https://github.com/NativeScript/nativescript-dev-webpack
Further things to research:
Debugging issues:
webpack:// domain and this should be removed for the VS Code extension.Encryption issues:
Other issues:
--bundle flag logic can be moved from the CLI to the plugin somehowtns-java-classes is bundled for iOS applications.ios suffix is not removed); __extends issuesRunning webpack with core NativeScript apps:
registerModule() for UI navigation to workThis should be resolved by nativescript-dev-webpack.
Most helpful comment
Debugging issues:
webpack://domain and this should be removed for the VS Code extension.Encryption issues:
Other issues:
--bundleflag logic can be moved from the CLI to the plugin somehowtns-java-classesis bundled for iOS applications.iossuffix is not removed);__extendsissuesRunning webpack with core NativeScript apps:
registerModule()for UI navigation to work