Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a build task for distribution #109

Closed
felixjung opened this issue Feb 19, 2018 · 2 comments
Closed

Create a build task for distribution #109

felixjung opened this issue Feb 19, 2018 · 2 comments
Labels
🛠️ tech Changes to the tech stack or infrastructure

Comments

@felixjung
Copy link
Collaborator

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?
@felixjung felixjung added the 🛠️ tech Changes to the tech stack or infrastructure label Feb 19, 2018
@connor-baer connor-baer mentioned this issue Mar 22, 2018
7 tasks
@qoalu
Copy link

qoalu commented Nov 9, 2018

is there any update on this? I am looking to choose between transpiling or including the library project for processing by webpack and babel

@connor-baer
Copy link
Member

connor-baer commented Nov 9, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ tech Changes to the tech stack or infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants