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

More readable error when trying to compose class that doesn't exist #2

Closed
2 tasks
axelboc opened this issue Feb 29, 2024 · 2 comments
Closed
2 tasks
Labels
enhancement New feature or request released

Comments

@axelboc
Copy link

axelboc commented Feb 29, 2024

Feature request

Improve error message when trying to compose a class that doesn't exist in the target CSS module.

Motivations

Thank you so much for looking into these CSS Modules issues! I'm still testing but the first problem I encountered was the following error:

Internal server error: Cannot read properties of undefined (reading 'exportAs')

It occurred on a composes declaration in which the class I was trying to compose did not exist in the target CSS module. This kind of issue was not reported previously, so it's such a nice win that it is now!!

Since the error message is a bit cryptic, would it be possible to rethrow a clearer error message?

Alternatives

No response

Additional context

No response

Contributions

  • I plan to open a pull request for this issue
  • I plan to make a financial contribution to this project
@axelboc axelboc added the enhancement New feature or request label Feb 29, 2024
@privatenumber
Copy link
Owner

Thanks for reporting this.

Since this bug wasn't reported/tracked in Vite, I filed it here: vitejs/vite#16075

@privatenumber
Copy link
Owner

🎉 This issue has been resolved in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

2 participants