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

Dotlottie Player: Request for local "Karla" font file that does not exist/compile. #308

Open
avrilpearl opened this issue Jan 29, 2024 · 1 comment

Comments

@avrilpearl
Copy link

Hi there, upon compiling the imported dotlottie player - the final js output seems to include a request for a local font file that does not exist - relating to this code:

Is it possible to remove this dependency? How can I prevent this from being included in my compiled code if I am importing the player via:

import '@dotlottie/player-component';

@avrilpearl avrilpearl changed the title Dotlottie Player: Request for non-existant "Karla" font file Dotlottie Player: Request for local "Karla" font file that does not exist/compile. Jan 29, 2024
@theashraf
Copy link
Member

From our side, we can configure the .styles.ts module to load dynamically only when the controls prop is set to true, since this font is unnecessary when controls are not displayed. It will still be included in your bundle, but it won't be requested and loaded in the browser unless you enable the controls prop.

Alternatively you can exclude the unwanted assets Karla-Regular.woff through your bundler's configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants