I am currently working on a hybrid app project that involves both NativeScript and Angular. To integrate the two, I have set up a WebView and consolidated all my Angular project files into a folder within my NativeScript project.
As part of this setup, I dynamically rewrite the base href in my Angular project like so:
<script>document.write('<base href="' + document.location + '" />');</script>
The bundled files are then loaded using the following code snippet:
let webview: WebView = this.webViewRef.nativeElement;
oWebViewInterface = new webViewInterfaceModule.WebViewInterface(
webview,
'~/www/app/index.html')
Initially, everything works as expected. However, when I introduce the --bundle
command and incorporate Webpack into the project, the base href no longer functions correctly, resulting in a "FILE NOT FOUND" error in the console.
I am now wondering where the new path is located for these bundled files.