Vite: Error messages when .server files are referenced by client (#8267)
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.tsdoes 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
Remove unstable_viteServerBuildModuleId in favor of manually referencing virtual module name "virtual:remix/server-build". (#8264)
This is a breaking change for projects using the unstable Vite plugin with a custom server.
This change was made to avoid issues where @remix-run/dev could be inadvertently required in your server's production dependencies.
Instead, you should manually write the virtual module name "virtual:remix/server-build" when calling ssrLoadModule in development.
-import { unstable_viteServerBuildModuleId } from "@remix-run/dev";
Vite: Fix errors for non-existent index.html importer (#8353)
Add vite:dev and vite:build commands to the Remix CLI. (#8211)
In order to handle upcoming Remix features where your plugin options can impact the number of Vite builds required, you should now run your Vite dev and build processes via the Remix CLI.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps @remix-run/dev from 2.3.1 to 2.4.1.
Release notes
Sourced from
@remix-run/dev
's releases.Changelog
Sourced from
@remix-run/dev
's changelog.... (truncated)
Commits
71f0e05
chore: Update version for release (#8362)e574dfb
chore: Update version for release (pre) (#8354)66adc8f
fix(vite): fix errors for non-existentindex.html
importer (#8353)343d3e9
chore: Update version for release (pre) (#8349)e64e81c
Bump router (#8348)c3eaf82
chore: Update version for release (pre) (#8347)96923a7
Bump router (#8346)3a8e7a8
chore: Update version for release (pre) (#8345)1e7b07b
fix(vite): disableserver.watch
for child compiler during build (#8320)3593c35
fix(remix-dev/vite): preload Vite ESM build in CLI (#8339)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show