Feature: Switch to es module exports
We currently bundle to es modules and commonjs with rollup.
This could stay, but our code has still to be transformed with babel to commonjs (require()
syntax) or processed in storybook with webpack with es compatible module loaders in storybook (related to #52 and #13 (closed)).
This increases build-time and once storybook is compatible with mjs (probably @storybook/react@6.0.0), we should switch the sources to mjs file extensions to use modules natively with node 14+ for all other javascript file extensions than jsx.
jsx
.jsx still requires a transformer to .js or .mjs.
Once storybook does not rely on the webpack package resolver (which is not compatible to native es-modules yet), we can switch fully to a non-babel setup and only transpile jsx.
other file extensions
Other file extensions for images or fonts should come from external packages bundled to js and be added as peerDependencies.