Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
remix-run-bot committed Dec 18, 2023
1 parent 21fd354 commit 6a1c4ff
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .changeset/breezy-grapes-roll.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
---

Vite: Error messages when `.server` files are referenced by client
* Previously, referencing a `.server` module from client code resulted in an error message like:
* `The requested module '/app/models/answer.server.ts' does not provide an export named 'isDateType'`
* This was confusing because `answer.server.ts` _does_ provide the `isDateType` export, but Remix was replacing `.server` modules with empty modules (`export {}`) for the client build
* Now, Remix explicitly fails at compile time when a `.server` module is referenced from client code and includes dedicated error messages depending on whether the import occurs in a route or a non-route module
* The error messages also include links to relevant documentation

- Previously, referencing a `.server` module from client code resulted in an error message like:
- `The requested module '/app/models/answer.server.ts' does not provide an export named 'isDateType'`
- This was confusing because `answer.server.ts` _does_ provide the `isDateType` export, but Remix was replacing `.server` modules with empty modules (`export {}`) for the client build
- Now, Remix explicitly fails at compile time when a `.server` module is referenced from client code and includes dedicated error messages depending on whether the import occurs in a route or a non-route module
- The error messages also include links to relevant documentation

0 comments on commit 6a1c4ff

Please sign in to comment.