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

Fix error when using vite-imagetool #9800

Conversation

tobigumo
Copy link

This PR resolves issue #9498 and is also related to PR #9305.

In PR #9305, the client asset list was changed to a file list. However, vite-imagetool generates assets during the build process, and these assets are not included in the file list, which seems to be causing the error.

I have modified the code to check both the asset list and the file list. This change appears to allow the build to complete without errors, and vite-imagetool seems to function correctly.

However, this is not a fundamental solution, and since I am not very familiar with Remix, I would appreciate any feedback on this PR.

Closes: #9498

  • Docs
  • Tests

Testing Strategy:

I didn't see any tests for the plugin file, so I didn't include them here.

Copy link

changeset-bot bot commented Jul 29, 2024

⚠️ No Changeset found

Latest commit: 7609b00

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Jul 29, 2024

Hi @tobigumo,

Welcome, and thank you for contributing to Remix!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run.

Thanks!

- The Remix team

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Jul 29, 2024

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

Copy link
Member

@markdalgleish markdalgleish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Since we've hit up against this issue a couple of times now, I've opted for a safer solution instead via #9901 where we use the file system as the source of truth rather than inferring it from the Vite manifest.

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

Successfully merging this pull request may close these issues.

Build fails when using vite-imagetools plugin due to assets already existing in build/client
3 participants