4

I would like to add <body><noscript><h1>Please enable your javascript<h1></noscript></body> in the developer mode.

I tried to configure it in the nuxt.config.js file but it didn't worked.

1 Answer 1

8

If you want to setup a noscript tag, you need to create an app.html in the root directory of your project as explained in the documentation.

Like this

<!DOCTYPE html>
<html {{ HTML_ATTRS }}>
  <head {{ HEAD_ATTRS }}>
    {{ HEAD }}
  </head>
  <body {{ BODY_ATTRS }}>
    <noscript>Your browser does not support JavaScript!</noscript>
    {{ APP }}
  </body>
</html>

Keep in mind that if you're using ssr: true, you will still get some content even if the JS is disabled because the content will be generated on the server for some parts.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.