vite-plugin-capacitor
v0.4.4
Published
Vite plugin for Capacitor JS.
Downloads
48
Maintainers
Readme
Vite Plugin Capacitor
Usage
- vite.config.js
import ViteCapacitor from 'vite-plugin-capacitor'
export default defineConfig({
plugins: [
// ...
ViteCapacitor({
pwaElementsVersion: 3,
silent: false
})
// ...
]
})
- capacitor.config.ts
{
// ...
server: {
url: process.env.VITE_CAPACITOR_URL,
cleartext: Boolean(process.env.VITE_CAPACITOR_URL),
},
// ...
}
- package.json
```bash
// serve with npm run capacitor
{
// ...
"scripts": {
// ...
"capacitor": "vite --host --mode=capacitor",
// ...
},
// ...
}