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

remix watch builds even when it can't resolve CSS imports #5506

Closed
1 task done
ryanflorence opened this issue Feb 17, 2023 · 2 comments
Closed
1 task done

remix watch builds even when it can't resolve CSS imports #5506

ryanflorence opened this issue Feb 17, 2023 · 2 comments

Comments

@ryanflorence
Copy link
Member

What version of Remix are you using?

1.8+

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

  • Yes

Steps to Reproduce

try to import a css file that doesn't exist:

import href from "./does/not/exist.css";

Then run remix watch

$ remix watch
Watching Remix app in development mode...
💿 Built in 159ms

But it's all a lie! Remix build knows the truth!

$ remix build
Building Remix app in production mode...

✘ [ERROR] Could not resolve "./does/not/exist.css"

    app/root.tsx:8:26:
      8 │ import appStylesHref from "./does/not/exist.css";
        ╵                           ~~~~~~~~~~~~~~~~~~

Expected Behavior

remix watch should fail exactly like remix build.

This is more concerning because it means the code paths are taking a significant branch somewhere. Might want to dig deeper and see if that branch really needs to be happening. remix watch should be as identical to remix build as possible.

There's also a good chance we just goofed up surfacing errors in watch mode at the top somewhere.

Actual Behavior

It reports that it built just fine.

This started happening in 1.8 and has persisted through 1.13 (I tried them all. Funny story, I went back one version at a time from 1.13, to 1.12, to 1.11, to 1.10, to 1.9, and then decided to do a binary search instead and went to 1.3, 1.6, 1.7 until 1.8. In an attempt to optimize my search I did nearly the worst possible search I could have done 🤣)

@pcattori
Copy link
Contributor

Potentially fixed by #5441

@ryanflorence
Copy link
Member Author

yep, tried @nightly and it's fine. that was easy.

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