How to generate non-HTML file (SSG) #1521
-
I want to create a file with the content I kind of got it to work with
but the response has dev script/snippet mixed in. response:
I want a way to turn it off. Also, if the route folder is called And, also, the route string is not respected. There is no final slash, so the page should be put at |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Why do you want to do that?
…On Sun 25. Feb 2024 at 14:15, iacore ***@***.***> wrote:
I want to create a file with the content abc. What can I do? +Page does
not work here.
—
Reply to this email directly, view it on GitHub
<#1521>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHVQRTA5QVHVFTMAZVW7O3YVM2OFAVCNFSM6AAAAABDY3VDTSVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGI3DQMJQGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Mixed Content in Response: The mixed content in your response is likely due to the default behavior of Vite to inject client-side scripts and snippets into the HTML response. If naming your route folder x.json causes issues with routing and loading, it may be due to conflicts with file extensions or unexpected behavior in the routing system. If the route string is not being respected and doesn't include the final slash as expected, you may need to adjust your routing configuration or server logic. |
Beta Was this translation helpful? Give feedback.
-
As discussed in #1525, this use case is not yet supported by Vike. WorkaroundCreate a custom script that generate files run it with |
Beta Was this translation helpful? Give feedback.
As discussed in #1525, this use case is not yet supported by Vike.
Workaround
Create a custom script that generate files run it with
vite-node generator-script.ts
.