react95-io / React95

🌈🕹 Windows 95 style UI component library for React
https://react95.io
MIT License
6.7k stars 187 forks source link

build: configure rollup-plugin-dts to use special compilerOptions #338

Closed WesSouza closed 2 years ago

WesSouza commented 2 years ago

An alternative to #329, passing specific TypeScript compilerOptions to rollup-plugin-dts.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react95 ✅ Ready (Inspect) Visit Preview Aug 4, 2022 at 8:58PM (UTC)
codesandbox-ci[bot] commented 2 years ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4724175b335b636f3bc6e7162ccc3223392f7de5:

Sandbox Source
React95 template Configuration
WesSouza commented 2 years ago

@arturbien @luizbaldi although this exported files on the correct locations, it still didn't generate one file per theme as expected.

Any objection to either:

arturbien commented 2 years ago

Ideally we should expose all components and themes in a way that would allow devs to import only the things they need (like MUI does):

import Button from '@mui/material/Button';

I am worried that if we bundle themes together, we're going to increase the bundle size. Especially if we keep adding more and more themes. I'll try to look into that during the weekend.

@luizbaldi any ideas?

WesSouza commented 2 years ago

@arturbien then we need to change rollup for the main entry too, it currently bundles the entire file into one export.

WesSouza commented 2 years ago

329 works nicely now.