Coder Social home page Coder Social logo

juliocastilla / acebase-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appy-one/acebase-core

0.0 0.0 0.0 1.11 MB

Core functionality for AceBase realtime database repositories

License: MIT License

Shell 0.39% JavaScript 9.75% TypeScript 89.86%

acebase-core's Introduction

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 are currently being refactored to TypeScript, allowing them to be transpiled to both ESM and CommonJS modules. This acebase-core package (v1.15.0+) now contains a distribution for both module systems, but only the CommonJS version is used until all AceBase packages have been migrated to TypeScript. The reason for this is to prevent both distributions of the acebase-core package to be used at the same time, introducing the so-called "Dual package hazard". Issues might arise if the acebase-core package is imported by multiple isolated packages, for example if both acebase-client and acebase packages are used in a project. They both have a dependency on acebase-core and depending on their version, both might be using different acebase-core module distributions.

To prevent possible issues, the CommonJS distribution will be used for both require and import statements until all AceBase packages have ESM distributions. If you use acebase-core in your own project and want to explicitly use the ESM distribution, import from "acebase-core/esm" instead of from "acebase-core".

To check current ESM support for each AceBase package, 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.

acebase-core's People

Contributors

appy-one avatar akvadrako avatar mitsichury avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.