Vite legacy plugin doesn't work #1607
Replies: 2 comments 8 replies
-
The best would be to have an example of how to setup Vike + the legacy plugin. I ain't that familiar with the legacy plugin, but let me know if you believe there is something about Vike that is blocking. Keep us updated about your findings. |
Beta Was this translation helpful? Give feedback.
-
I use vike(0.4.168)+vite(4.4.9)+@vitejs/plugin-legacy(4.1.1) to build SSR project, and it contain legacy files like
SSR Project don't generate html file, so @vitejs/plugin-legacy do not inject nomodule script into it. Could I need replace body from server/index.js ? Is there any better way to do?🤔 import express from 'express'
...
app.get('*', async (req, res, next) => {
...
res.send(body) // body.replace() to add nomodule script ?
}) |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm trying to use Vike with HTML-only rendering and some +client.js files along with the vite legacy plugin. I've tried html-only, ssr, and client-only (in the
renderer/config.js
file) and there's never a legacy script tag included. I've seen a few other discussions about the legacy plugin, but couldn't really find any useful information. I've read all of issue #1154 and even when using the latest Vike version with the https://github.com/brillout/repro-vike-vite-plugin-legacy repo it didn't output any legacy script tags. I'm really not sure what to do--my project is pretty much the default from running bati and then changing it to add the legacy plugin and html-only mode.renderer/+config.ts
:vite.config.ts
:Beta Was this translation helpful? Give feedback.
All reactions