There are a set of plugins that come as a default with Capacitor, the Camera and Geolocation are in that category. To access those plugins from @capacitor/core node module.
Then opened up the main.js file in the vue project and make the following changes
import{defineCustomElements}from'@ionic/pwa-elements/loader';// <== NEWVue.config.productionTip=false;Vue.use(Ionic);newVue({router,render:h=>h(App)}).$mount("#app");defineCustomElements(window);// <== NEW
and then the magic happened, Ionic will now use the pwa-element to access the web camera instead of looking for the device camera.
Adding A Non Capacitor Plugin
I am testing with the Barcode Scanner Plugin, you will need to install the plugin using npm
npm install phonegap-plugin-barcodescanner
and then in the source code you get access to the plugin off of the window object. In your code, you can also check the window object for cordova to make sure the user doesn't try and load the barcode scanner in the browser.