Vite
ReadMeter works with any Vite-based app (React, Vue, Svelte, etc.). The installer injects the widget into your HTML entry file.
Quick setup
From your Vite project folder, run:
readmeter addThe installer copies the widget to public/readmeter-widget.js and adds a script tag to your index.html.
Manual setup
If the installer doesn't find your HTML, add the script tag before your app script:
<!-- index.html -->
<!DOCTYPE html>
<html>
<head>
<script src="/readmeter-widget.js"></script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>Modular Firebase SDK (v9+)
If you use import { getDoc, getDocs } from 'firebase/firestore', use the wrapper:
// Before
import { getDoc, getDocs, onSnapshot } from 'firebase/firestore'
// After
import { getDoc, getDocs, onSnapshot } from './lib/readmeter-firestore'