Skip to content

Instantly share code, notes, and snippets.

@eric1234
Last active April 15, 2022 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eric1234/ccb790dbec28bd68d108cfd034679276 to your computer and use it in GitHub Desktop.
Save eric1234/ccb790dbec28bd68d108cfd034679276 to your computer and use it in GitHub Desktop.
PouchDB Rollup Conflict
import PouchDB from 'pouchdb-browser'
import MemoryAdapterPlugin from 'pouchdb-adapter-memory'
PouchDB.plugin(MemoryAdapterPlugin)
{
"name": "rollup-test",
"private": true,
"scripts": {
"build": "rollup -c"
},
"dependencies": {
"pouchdb-adapter-memory": "^7.2.2",
"pouchdb-browser": "^7.2.2"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^21.0.3",
"@rollup/plugin-node-resolve": "^13.2.0",
"rollup": "^2.70.1",
"rollup-plugin-node-polyfills": "^0.2.1"
}
}
import commonjs from '@rollup/plugin-commonjs'
import resolve from '@rollup/plugin-node-resolve'
import nodePolyfills from 'rollup-plugin-node-polyfills'
export default {
input: 'index.js',
output: {
format: 'iife',
name: 'app',
file: 'bundle.js'
},
plugins: [
nodePolyfills(),
resolve({
preferBuiltins: true,
browser: true
}),
commonjs({
dynamicRequireTargets: [
'node_modules/memdown/*.js',
],
}),
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment