Skip to content

Conversation

@WesSouza
Copy link
Member

@WesSouza WesSouza commented Aug 4, 2022

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

This restores importing React and the ESLint rule react/react-in-jsx-scope to preserve React 16 compatibility.

This also moves some types around so themes can be exported as a standalone with its own TypeScript config.
@WesSouza WesSouza added the bug Something isn't working label Aug 4, 2022
@WesSouza WesSouza requested review from arturbien and luizbaldi August 4, 2022 20:57
@WesSouza WesSouza self-assigned this Aug 4, 2022
@vercel
Copy link

vercel bot commented Aug 4, 2022

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
Copy link

codesandbox-ci bot commented Aug 4, 2022

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 4724175:

Sandbox Source
React95 template Configuration

@WesSouza
Copy link
Member Author

WesSouza commented Aug 5, 2022

@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:

  • Export one bundle with all themes in one object
  • Export the themes together with react95 and only have one entry

@arturbien
Copy link
Member

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
Copy link
Member Author

WesSouza commented Aug 5, 2022

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

@WesSouza
Copy link
Member Author

WesSouza commented Aug 5, 2022

#329 works nicely now.

@WesSouza WesSouza closed this Aug 5, 2022
@WesSouza WesSouza deleted the build/wes/dts-config branch August 5, 2022 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants