pubkey / rxdb

A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/
https://rxdb.info/
Apache License 2.0
21k stars 1.02k forks source link

Support rx-lite #149

Closed natew closed 7 years ago

natew commented 7 years ago

Just curious about this.

I really don't use Rx for anything, it's just an implementation detail of rxdb for me. I've considered forking RxDB and taking out the Rx part, but that would be a pretty big project and would prefer to keep more wood behind arrows.

Tried swapping out lite using webpack but it's complaining of importing rxjs/observable. Any chance of supporting this? I could help with the migration if there's no big blockers.

pubkey commented 7 years ago

What are the benefits of rx-lite? I thought cherry-picking the imports is enough to get a low build-size. See here

natew commented 7 years ago

In that case you'd likely wan't to export that custom Rx bundle somewhere. For example, I don't really use Rx much, but for debugging certain things I want access to the Rx object. So I could either

import { Observable } from 'rxjs/Observable'
// all other imports from RxDB...
// or...
import { Rx } from 'rxdb'
// => custom Rx bundle exported from rxdb

Depends I guess. Since this is an internal thing perhaps the first option is ok.

pubkey commented 7 years ago

Closed. RxDB needs rxjs internally. You can use the same Rx-Object as RxDB by importing the util-module.

import {Rx} from 'node_modules/rxdb/dist/lib/util';