react-ui icon indicating copy to clipboard operation
react-ui copied to clipboard

Support usage from source in downstream

Open adamkudrna opened this issue 1 year ago • 0 comments

As of now, we only support the quick-usage scenario via ready-to-use CSS and JS bundles.

Expert Mode

Aside from that, we also want to support the "expert" scenario for those who want to have more control over what is bundled into their app. This means:

  • loading common Sass source files directly (everything except components),
  • loading JS components as modules that take their Sass styles with them.

👉 Add the "module" directive to our package.json to make the ESM way easier: https://antfu.me/posts/publish-esm-and-cjs

Caveats

⚠️ Beware of Sass imports we currently have in our src/index.js:

import './theme.scss';
import './foundation.scss';
import './helpers.scss';

⚠️ Do not break current CSS and JS bundles.

adamkudrna avatar Apr 15 '24 14:04 adamkudrna