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

[x-license] Improve license key organization logic #9346

Open
oliviertassinari opened this issue Jun 15, 2023 · 0 comments
Open

[x-license] Improve license key organization logic #9346

oliviertassinari opened this issue Jun 15, 2023 · 0 comments
Labels
enhancement This is not a bug, nor a new feature package: x-license Specific to @mui/x-license.

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 15, 2023

Summary 💡

@mui/x-license-pro includes the generate license logic, and exposes it https://bundlephobia.com/package/@mui/x-license-pro. This is hosted here: https://github.com/mui/mui-x/tree/master/packages/x-license-pro/src/generateLicense. It could be nice to isolate it for the sake of optimizing the bundle size. It's less tree shaking work for the bundler to do, and a smaller bundle in dev mode. To note that we depend on it in https://github.com/mui/mui-private/blob/a23043d680d5e0d884fb78af74b653c1ca89071d/tools-private/toolpad/components/licenseGenerator.tsx#L4.

To consider if there is value at hiding the license key generator from a sales perspective but I don't buy it. We target enterprises, they won't take this type of legal risk.

As a side note, working on this would also be a great opportunity to remove the logic duplication with: https://github.com/mui/mui-private/blob/a23043d680d5e0d884fb78af74b653c1ca89071d/tools-private/toolpad/components/licenseDecoder.tsx.

The solution might be as simple as keeping the logic in the npm package but to isolate it into its own non exposed subfolder. Otherwise, a different npm package.

@oliviertassinari oliviertassinari added performance package: x-license Specific to @mui/x-license. enhancement This is not a bug, nor a new feature and removed performance labels Jun 15, 2023
@oliviertassinari oliviertassinari changed the title [license] Move license key generation logic [license] Improve license key organization logic Jun 15, 2023
@oliviertassinari oliviertassinari changed the title [license] Improve license key organization logic [x-license] Improve license key organization logic Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature package: x-license Specific to @mui/x-license.
Projects
None yet
Development

No branches or pull requests

1 participant