So I have been struggling to get any JS for Capacitor plugins to work. After two days of deep diving into the issue, I believe that the bundler that auto installed when you add a platform to a mobile app project has been deprecated.
“[warn] The bundledWebRuntime configuration option has been deprecated. Please, use a bundler to bundle Capacitor and its plugins.”
This has been causing both import and require within JS to throw an error in the dev console. Most of the Capacitor plugins need import or require to use.
Is this something that can be updated on Wappler’s end? Or is there a workaround to get my mobile app code bundled?
I have tried using Rollup and Webpack but can’t figure out what the entry file within the Wappler project is.
Here is the full output as soon as I add iOS to a mobile project.
Have you seen https://youtu.be/DFvtXYCJzew?si=3S2g9TPlAiWl-eya . He talks through getting local notifications plugin working in capacitor and wappler. Is a year old though so it may not work now.
The only thing I would add, is that after you add your platforms (iOS and Android), each time you need to go back into your package.json and switch your “@capacitor/core”: version back to 5.3.0 from 4.6.0 then run npm install in your terminal.
Wappler keeps reverting it to 4.6.0 every time you add a platform.
And did you still need this modification even though you updated the capacitor as @Teodor indicated? For me it keeps giving me an error, I’m trying to use the Push Notification plugin in my project.