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

ESBuild metafile includes file size of asset imports #7836

Open
1 task done
lensbart opened this issue Oct 31, 2023 · 0 comments
Open
1 task done

ESBuild metafile includes file size of asset imports #7836

lensbart opened this issue Oct 31, 2023 · 0 comments

Comments

@lensbart
Copy link
Contributor

lensbart commented Oct 31, 2023

What version of Remix are you using?

2.1.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

Use Remix

import src from './some-img.jpg'
export default function Component() {
  return <img src={src} alt="some img" />
}

Remix will put the image in public/build/_assets, i.e. keep it out of the bundle. When uploading the generated metafile to https://esbuild.github.io/analyze/, it lists the image as if included in the bundle.

Expected Behavior

No heart attack when inspecting bundle size on https://esbuild.github.io/analyze/

Actual Behavior

Slightly discombobulated

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

No branches or pull requests

2 participants