Webpack & WebView html file not found err


I have an issue with the latest
tns using tns run android --bundle

Got runtime error that webview.html file is not found, but everything works fine without bundling.

JS: Error loading file:///data/data/org.nativescript.BTrex/files/app/webview.html: net::ERR_FILE_NOT_FOUND(-1)

I define the input file like that:

 const webView: WebView = this.webView.nativeElement;
 this.oWebViewInterface = new webViewInterfaceModule.WebViewInterface(webView, '~/webview.html');

Does anyone know what’s the work around for that?
Shall i manulally copy the webview.html file from the /app location to respective folder in with webpack copy plugin?


Webpack wouldn’t know you are using those html files until you tell it. Follow the instructions here.