We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ssr.optimizeDeps
vite-node-miniflare
Initially, I gave up vite-node's prebundling for vite-node-miniflare + react demo, then later ended up with creating my own pre-bundling plugin:
react
vitePluginPreBundle
but maybe optimizeDeps was never made to work in vite-node ssr as explained in this issue:
optimizeDeps
Quick workaround could be to trigger dummy ssrLoadModule in configureServer hook?
ssrLoadModule
configureServer
https://stackblitz.com/edit/vitest-dev-vitest-8wf26p?file=vite.config.ts
import { defineConfig } from 'vite'; export default defineConfig({ plugins: [ { name: 'force-ssr-optimize-deps', configureServer(server) { return async () => { console.log('[trigger ssrLoadModule]'); const mod = await server.ssrLoadModule('/dummy-module.js'); console.log('[dummy-module]', mod); }; }, }, ], });
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Initially, I gave up vite-node's prebundling for
vite-node-miniflare
+react
demo, then later ended up with creating my own pre-bundling plugin:vitePluginPreBundle
#128but maybe
optimizeDeps
was never made to work in vite-node ssr as explained in this issue:Quick workaround could be to trigger dummy
ssrLoadModule
inconfigureServer
hook?https://stackblitz.com/edit/vitest-dev-vitest-8wf26p?file=vite.config.ts
The text was updated successfully, but these errors were encountered: