I admit my lack of expertise in building modern JavaScript apps is becoming evident.
Currently, we have a Capacitor app that uses plain JavaScript without any build tools, and it functions well. Our goal is to incorporate Microsoft Code Push support through https://github.com/mapiacompany/capacitor-codepush. However, we are facing challenges integrating it into our app.
When using Capacitor and its plugins, we typically use <script> tags to include the plugin.js files from various node_modules/.../dist directories. But when we do this with node_modules/capacitor-codepush/dist/plugin.js, we encounter an error related to missing acquisitionSdk. Even including node_modules/code-push/script/acquisition-sdk.js does not resolve the issue.
We speculated that there might be multiple dependencies involved. We attempted to utilize Rollup to address this, but unfortunately, we were unsuccessful. The following simple input file was used:
import { codePush } from 'capacitor-codepush';
console.log("hello");
This resulted in the error message:
[!] Error: Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.
Any assistance or guidance on resolving this issue would be greatly appreciated.