Skip to content

Issue with adapter pouchdb-adapter-idb on dev vs production builds #2798

Closed
@akmjenkins

Description

Case

Bug

Issue

Errors in production build of create-react-app using pouchdb-adapter-idb but NOT in development.

Info

  • Environment: Browser
  • Adapter: IndexedDB
  • Stack: React

Code

N/A

When I run my create-react-app in development mode, everything works fine. But when I build it for production, I receive these errors:

Error: You are using a function which must be overwritten by a plugin.
        You should either prevent the usage of this function or add the plugin via:
            import { RxDBUpdatePlugin } from 'rxdb/plugins/update';
            addRxPlugin(RxDBUpdatePlugin);

So far I've received 3 different ones about various plugins because it was working in development but not in a production build. The errors are very helpful and I was able to fix it quickly, but the difference between a development and production build is concerning.

Not sure what the difference is between production and development, or what repository this PR needs to go on, but something funny is happening.

By the way, thanks for the amazing library!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions