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
Doesn't work with custom server #21
Comments
I haven't tested this plugin in Vite's middleware mode. Can you fork the master branch and setup the |
I've added a server example to your demo folder: Run I'm guessing it should possible to write a Jest test for it, by just creating the Vite server and loading a module: import { createServer } from "vite";
const vite = await createServer({
server: {
middlewareMode: true
}
});
await vite.ssrLoadModule("/src/entry-server.ts"); |
Thanks! I've submitted a PR to |
Looks like this is resolved w/ vite@2.2.4 ! Edit: actually seems like it is still happening on production build only?
|
@chrisvariety That looks unrelated, and I can't reproduce it. Please open a new issue with a repository link for reproducing it. 👍 |
@chrisvariety Are you running Windows? Got a developer running Windows that gets this issue, while the same code builds fine on my machine. Something to investigate |
@thebuilder nope, Mac over here. I'll try to put together a minimal reproduction. |
Interesting - Could it be an |
I'm running Vite dev with a custom Express server, and after upgrading
vite-tsconfig-paths
from version 2.5.1 it breaks.Seems to work if just running
vite dev
.viteResolve
is set inbuildStart
, but this function is never called.https://github.com/aleclarson/vite-tsconfig-paths/blob/master/src/index.ts#L21
It breaks the moment I try to load a module using
vite.ssrLoadModule
. I've tried trim theserver.mjs
file down to the essentials:server.mjs
The text was updated successfully, but these errors were encountered: