Skip to content

Core functionality for AceBase realtime database repositories

License

Notifications You must be signed in to change notification settings

appy-one/acebase-core

Repository files navigation

AceBase core components

This package contains shared functionality that is used by other AceBase packages, no need to install manually. See acebase, acebase-client and acebase-server for more information.

ESM and CJS bundles

All AceBase packages have been ported to TypeScript, allowing them to be transpiled to both ESM and CommonJS modules. This means that it is now safe for acebase-core (v1.25.0+) to export its ESM build when used with an import statement. If 1 or more AceBase (database, client, server, ipc-server etc) packages are used in a single project they'll use the same core codebase, preventing the so-called "Dual package hazard".

For more info, see the ESM module support discussion on GitHub.

Bundler browser replacements

To provide browser support, some source files have a browser-specific counterpart which were previously only specified in the main package.json. Since there are now multiple distributions, the distribution specific browser replacements have been added to the package.json files in the dist/cjs and dist/esm directories: bundlers like Webpack and Browserify use those instead of the ones in the root package.json. Vite (and Rollup?) only seem to use the replacements listed in the root package.json, that's why they still need to be mentioned there as well.