Socket
Socket
Sign inDemoInstall

@luxdefi/ui

Package Overview
Dependencies
36
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @luxdefi/ui

Library that contains shared UI primitives, common design system components, and boilerplate.


Version published
Maintainers
2
Created

Readme

Source

no index.ts file, and load-and-return-lux-next-fonts-on-import.ts

Next font loading requires the fonts to be assigned to const's in module scope (ie, loaded when the module is evaluated, exactly once).

If there was an index.ts "barrel file", and the client code imported anything from this package, it would have resulted in evaluting all the packages imported including the that loaded the fonts. Without the index, the client code knows what modules import it and thus when it happens.

tl;dr: See this article from Vercel about this issue.

(Previously, not having this safegaurd caused a serious bug becuase the fonts were loaded far too early.)

Keywords

FAQs

Last updated on 14 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc