Skip to content

Commit 60d8e26

Browse files
committed
Export browser bundle of drivers as ECMAScript module
ECMAScript modules are the official standard format to package JavaScript code for reuse. This is standard improve the modularity of the applications by avoiding leaking global variables and other benefits. Usage example of the `neo4j-driver-lite` esm in browser: ```javascript // jsDelivr CDN minified for production use, version X.Y.Z where X.Y.Z >= 5.4.0 import neo4j from 'https://cdn.jsdelivr.net/npm/neo4j-driver-lite@X.Y.Z/lib/browser/neo4j-lite-web.esm.min.js' const driver = neo4j.driver(/* your host */, neo4j.auth.basic(/* user */, /* password */)) driver.verifyConnectivity() .then(() => console.log('Connected')) .catch(e => console.error(e)) ``` **Changes in the `neo4j-driver-lite`** `Browserify` was replaced by `rollup` as the browser building tool for building `umd` and `esm` outputs. Since `rollup` is already being used in the `testkit-backend`, this change also standardise the tooling in the monorepo. The esm module is exported as `neo4j-lite-web.esm.js` (non-minified) and `neo4j-lite-web.esm.min.js` (minified). The files are available under `lib/browser` along with `umd` modules.
1 parent ee72ed0 commit 60d8e26

File tree

7 files changed

+62560
-65192
lines changed

7 files changed

+62560
-65192
lines changed

0 commit comments

Comments
 (0)