`main.js` being loaded alongside `main.native.js` when running `npm run serve:android`
scebotari66 opened this issue · 3 comments
I have an existing Vue web app, and I am trying to integrate this plugin to create a mobile app in the same code base.
I wanted to initially build a simple page for the mobile app without any ties to the web app. So I have created a App.native.vue file with a simple template and ran npm run serve:android. While the app starts on the mobile device, I get a lot of warning in the terminal related to the web app components.
I can also see from the terminal that the main.js file is also bundled for the mobile app:

I was expecting only the main.native.js file to be loaded. Is this an issue, or did I miss something?
Could you add reproduce link? Probably,main.js file imported any js file or vue component. You have to import files without extensions.
I have created a simple sample app here: https://github.com/scebotari66/helloworld-vue-cli-plugin-nativescript-vue.
In the src directory I have the main.js which imports App.vue and main.native.js which explicitly imports App.native.vue.
My question is why when I run npm run serve:ios, I get the following error in the terminal:

It says that there is an error in the App.vue file. Why does it load that file? Shouldn't only the App.native.vue file be loaded?
Could you add reproduce link? Probably,main.js file imported any js file or vue component. You have to import files without extensions.
Thanks that was the issue in my case. I just remove the extension .vue from my import