0.5.2 • Published 6 months ago

vite-plugin-firebase v0.5.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

vite-plugin-firebase npm

This plugin will start firebase emulators (by default hosting & functions) in-process when running vite dev server (vite serve).

Installation

npm install --save-dev vite-plugin-firebase

Usage

Add it to vite.config.js

import firebasePlugin from 'vite-plugin-firebase';

export default {
  plugins: [firebasePlugin({
    // mandatory firebase project id
    projectId: 'my-project-id',
    // project directory, i.e. where firebase.json is (defaults to `config.root`)
    root: path.resolve('somewhere'),
    // whether to materialize (write on disk) `.runtimeconfig.json` for functions emulator (defaults to `false`)
    materializeConfig: true,
    // emulator targets (defaults to `['hosting', 'functions']`)
    targets: ['hosting']
  })]
}

Caveats

This plugin uses internal firebase-tools APIs to load emulators in-process. May break upon firebase-tools releases, have been tested with 9.22 & 9.23

License

MIT

Copyright (c) 2021-present, ‹div›RIOTS

0.5.2

6 months ago

0.5.0

1 year ago

0.5.1

1 year ago

0.4.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.4

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago