vite-plugin-capacitor
TypeScript icon, indicating that this package has built-in type declarations

0.4.4 • Public • Published

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",
    // ...
  },
  // ...
}

Package Sidebar

Install

npm i vite-plugin-capacitor

Weekly Downloads

2

Version

0.4.4

License

MIT

Unpacked Size

3.83 kB

Total Files

4

Last publish

Collaborators

  • ekoeryanto