Capacitor 5.3.0
I want to apologize for my low understanding here.
I’m trying to install some capacitor plugins but I found some troubles:
<script type="module" src="js/network.js"></script>
import { Network } from '@capacitor/network';
Network.addListener('networkStatusChange', status => {
console.log('Network status changed', status);
});
const logCurrentNetworkStatus = async () => {
const status = await Network.getStatus();
console.log('Network status:', status);
};
Uncaught TypeError: Failed to resolve module specifier "@capacitor/network". Relative references must start with either "/", "./", or "../".
So I went to the forum and:
If you don’t want to use a bundler/framework, you can set "bundledWebRuntime": true in capacitor.config.json .
That generates a capacitor.js file you can link in your app’s index.html.
That way you can use Capacitor object directly, which includes a Plugins object that contains all plugins.
So you can use the plugins like Capacitor.Plugins.StatusBar.hide();
But:
<script src="capacitor.js"></script>
capacitor.js net::ERR_ABORTED 404 (Wappler: Not Found)
Because indeed, there’s no capacitor.js on the Wappler project.
There’s a step I’m missing here?
Thanks.