Last active
April 15, 2022 16:02
-
-
Save eric1234/ccb790dbec28bd68d108cfd034679276 to your computer and use it in GitHub Desktop.
PouchDB Rollup Conflict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PouchDB from 'pouchdb-browser' | |
import MemoryAdapterPlugin from 'pouchdb-adapter-memory' | |
PouchDB.plugin(MemoryAdapterPlugin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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