Cordova functions dont' work with webpack

How i can get functions of cordova using webpack of framework-cli, i receive always not defined.

What do you mean by functions of cordova? Are you referring to the cordova CLI commands? Can you give some examples of the commands you have tried?

For example:

In a one page named radar, i can’t call one function on app.js

  function openTelaQrCode(){
   var retorno = bateriaMininaNecessaria();	
	
   if (retorno==true){
   	
   cordova.plugins.barcodeScanner.scan(
   function (result) {
   /*  alert("We got a barcode\n" +
      "Result: " + result.text + "\n" +
      "Format: " + result.format + "\n" +
   "Cancelled: " + result.cancelled);*/
    var str = 'pereirabarreto.sp.gov.br';
	if ((result.text!='')  && (str.match(/pereirabarreto.sp.gov.br/)) ){
	//alert (result.text);
	 
		
		
		 app.dialog.preloader('Consultando a Pref ...');
  setTimeout(function () {
    app.dialog.close();
  }, 5000);

and… in page radar

<button onClick="escanearServidor.validarServidor()" class="col button button-fill margin-top color-green"> ESCANEAR CRACHÁ </button>

<script>
	

	
 import {escanearServidor} from '../js/app.js';
	
 	
	
	  export default {
    data() {
      return {
        foo: 'bar',
		app: app, 
      }
    },
    methods: {
      abre() {
        escanearServidor.validarServidor();
      }
    }
  }
		
</script>

Then, in this way i get in console.log cordova is not defined