A quick example of vue.js and pouchdb working together!
bun install
bun dev
bun build
Run Unit Tests with Vitest
bun test:unit
Lint with ESLint
bun lint
https://vuejs.org/guide/quick-start
bun add pouchdb
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/',
},
},
});