Test different JavaScript modules and packaging for node and the browser.
This is the most straight-forward scenario: no transpilation needed, everything basically self-contained. Functions (or
classes) are exported via module.exports
.
Using the package is possible from ES style modules (i.e. type
set to module
using import
) when importing the
default export and destructuring afterwards to a const
.
This use-case simply transfers the level 0 use-case over to use ES modules. The most significant changes are that
the JavaScript files now end with .mjs
and the package.json
configures type
to be module
. Functions (or classes)
are exported via export
/export default
(examples are omitted here).
to be written...