#Add vanilla html and javascript page to nuxt project.

4 messages · Page 1 of 1 (latest)

manic hornet
#

I have an older project i want to showcase. It uses vanilla javascript, listening to events and updating the dom etc.. It makes no sense to spend days rewriting it, so I just want to copy paste it. But nuxt is throwing errors when i paste the script tag, and if i paste the script outside the functions are not available for the elements in the dom..

(nuxt3)

empty sedge
#

if you're using .vue files it won't work because you need to use template syntax...

I mean, you could use something like serve static, or another module to serve the static html file from the server..

Maybe stick it in the public folder and allow users to access it like an asset?

manic hornet
#

thx i will have to look for putting that page completely outside of nuxt. would be cool to be able to navigate to it normally.

#

i wish i could override the <script> tag being removed from the template