Skip to content

mccombs/vue-pouchdb

Repository files navigation

vue-pouchdb

A quick example of vue.js and pouchdb working together!

Project Setup

bun install

Compile and Hot-Reload for Development

bun dev

Type-Check, Compile and Minify for Production

bun build

Run Unit Tests with Vitest

bun test:unit

Lint with ESLint

bun lint

Recreate this example

1 - Quickstart Vue

https://vuejs.org/guide/quick-start

2 - Add pouchdb

bun add pouchdb

3 - Add polyfill

At the time of writing - there is a node dependency issue with vite that requires a polyfill. Read more about it in this github issue.

To get pouchdb up and running run

bun add events webpack-node-polyfill

Then update your vite.config.ts

import { defineConfig } from 'vite';
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';

export default defineConfig({
  plugins: [
    NodeGlobalsPolyfillPlugin({
      buffer: true,
    }),
  ],
  resolve: {
    alias: {
      events: 'events/',
    },
  },
});

About

A quick example of vue.js and pouchdb working together!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published