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

Importing CSS modules fails #98

Closed
theodoretliu opened this issue Jul 8, 2021 · 2 comments
Closed

Importing CSS modules fails #98

theodoretliu opened this issue Jul 8, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@theodoretliu
Copy link

Hi, really love this project, and super excited to continue testing it out :)

In one of my Javascript files, I'm attempting to import CSS Modules via

import styles from './styles.module.css'

but this is generating errors like the following in my Chrome console

GET http://localhost:3002/vite-dev/@fs/app/javascript/src/components/LeftNav/styles.module.css net::ERR_ABORTED 404 (Not Found)

am I missing a step here?

@theodoretliu theodoretliu added the bug: pending triage Something doesn't seem to be working, but hasn't been verified label Jul 8, 2021
@ElMassimo ElMassimo added bug Something isn't working and removed bug: pending triage Something doesn't seem to be working, but hasn't been verified labels Jul 12, 2021
@ElMassimo
Copy link
Owner

Hi Theodore! Thanks for reporting.

It seems to be related to the dev server proxy, where the .css extension is being removed before forwarding the request to the Vite dev server.

Releasing a new version with the patch soon.

@ElMassimo
Copy link
Owner

@theodoretliu Upgrading vite_ruby to 1.2.17 should allow CSS Modules requests to be served correctly in development. Thanks again for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants