You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently all our build tasks revolve around building and publishing the storybook.
To set up distribution via NPM or even just using circuit-ui we need a proper build script that will create modules in a distribution folder.
Here are some open questions regarding how such a build setup should work:
What does an ESM build look like? What is transpiled, what is not? We should look at popular frontend libraries to understand that better.
Which bundler to use? A lot of people recommend using Rollup for libraries, as it has always had superior tree shaking and other features relevant to keep sizes small, when compared to Webpack. Very recently a new version of Rollup has come out, which supports native import and import() in browsers and optionally builds versions for browsers that don't support these ES features, yet. Is it worth investigating Rollup? On the other hand Webpack 4 is around the corner and Storybook uses Webpack anyway. Should we have a project with two bundlers for different use cases?
The text was updated successfully, but these errors were encountered:
Hey @qoalu, have a look at #266, which contains a working build task to transpile the code to both cjs and es modules. In fact, we publish Circuit UI to NPM using that setup. The PR just hasn't been merged yet since some of our applications still install Circuit UI straight from GitHub.
Currently all our build tasks revolve around building and publishing the storybook.
To set up distribution via NPM or even just using circuit-ui we need a proper build script that will create modules in a distribution folder.
Here are some open questions regarding how such a build setup should work:
import
andimport()
in browsers and optionally builds versions for browsers that don't support these ES features, yet. Is it worth investigating Rollup? On the other hand Webpack 4 is around the corner and Storybook uses Webpack anyway. Should we have a project with two bundlers for different use cases?The text was updated successfully, but these errors were encountered: