Open Junior2Ran opened 2 months ago
Could you please try to write scripts in index.html
like?
<script src="<%= injectScript %>">
It works on index.html. But it doesn't work on app.html. Only index.html needs injecting script. Is there a way to convert the inject content to be inline string?
<%= if(xxx){xxx} %>
You can reference the ejs docs
My ejs template doesn't work, it might goes wrong somewhere. It shows error when
vite dev
, theinjectedScript
in buildedindex.html
turns to be a js virtual file.Please help ! How can I solve the problem ? I have tried:
base
config, not work.type=module
in injectedScript,vite
shows error thatimport.meta.env
must in module.The template is like below
And my plugin config is like