Failed to resolve module specifier “@tauri-apps/api/http”
import { fetch } from ‘@tauri-apps/api/http’; document.addEventListener(‘DOMContentLoaded’, async function() { const serverIP = ‘http://185.221.21.49:30120/players.json’; const playerCountElement = document.getElementById(‘player-count’); const response = await fetch(serverIP, { method: ‘GET’, timeout: 1000, }) console.log(“response:”, response) .then(response => { if (!response.ok) { throw new Error(`Network response was not ok: ${response.statusText}`); } return response.data; }) .then(data => { if (data && […]