Cordova modules not loading with Vite Builder

Hi guys,

I’m using ViteJS now instead of WebPack to build my F7 VUE App but i get an error from the vendor js file on iOS saying this module can’t be found:
const pushwoosh = cordova.require(‘pushwoosh-cordova-plugin.PushNotification’);

All the plugins and Cordova are loaded correctly, does this have anything to do with Vite Maybe having and issue with requiring modules? The error comes from the vendor JS file generated by ViteJS

Did the same work correctly with Webpack?

For me it doesn’t seem to be a Vite issue, cordova.require is handled by cordova, not Vite.
I would suggest at first double check the plugin installation docs Integrating Cordova Plugin - Pushwoosh

For me it seems like cordova/plugin-side issue

I thought the same, its really weird cordova and all plugins are loaded correctly.

If i do a console.log for cordova.require it does output the function.

It doesnt load any modules by the way.

@nolimits4web do you have a cli build version with webpack install for framework7-vue ^6.3.2 ?

I’m upgrading from version 5 and nothing works anymore so i can’t test now if it’s a Vite Issue

You can just install previous version of F7 CLI which generates Webpack project and check there, npm i [email protected]

@nolimits4web it has noting to do with Vite indeed.

I got it working, i had to remove the app from the simulator in XCode, i guess it was a stupid cache issue. I have been trying to solve this issue for 2 days now :stuck_out_tongue: