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

vite.build.assetsInlineLimit is invalid #11540

Closed
1 task
peipei818 opened this issue Jul 24, 2024 · 1 comment
Closed
1 task

vite.build.assetsInlineLimit is invalid #11540

peipei818 opened this issue Jul 24, 2024 · 1 comment
Labels
needs triage Issue needs to be triaged

Comments

@peipei818
Copy link

peipei818 commented Jul 24, 2024

Astro Info

Astro                    V4.8.7
Node                     v18.17.1
Package Manager          pnpm

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

vite.build.assetsInlineLimit configuration is invalid.

When i use background image url to import img in css, it was valid. Imported or referenced assets that are smaller than this threshold will be inlined as base64 URLs.

  div {
    background-image: url('../assets/check.svg');
  }

But when i use import img in javascript, it was invalid.

---
import checkImg from '../assets/check.svg';
---

<img src={checkImg.src} alt="" />

What's the expected result?

I want to use base64 image.

Link to Minimal Reproducible Example

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 24, 2024
@Princesseuh
Copy link
Member

Duplicate of #11361

@Princesseuh Princesseuh marked this as a duplicate of #11361 Jul 24, 2024
@Princesseuh Princesseuh closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants