I am trying to render a simple HTML page in Nuxt,
I tried layouts/empty.vue
<template>
<nuxt />
</template>
<script>
export default {
components: {},
};
</script>
and page pages/simple.vue
<template>
<div>Redirecting to <a :href="dynamicUrl">{{dynamicUrl}}</a>.</div>
</template>
<script>
export default {
layout: "empty",
asyncData() {
// ... code to get dynamicUrl for the user
}
}
</script>
It works, but the page is loaded with styles, javascript other nuxt-related things. What I need is - just a simple HTML page(like a static page) but with dynamic content(without any styles and javascript files). How to do it in nuxt? This is what I need in the output:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url=\'.....dynamicUrl'" />
<title>Redirecting...</title>
</head>
<body>
<div>Redirecting to <a :href="dynamicUrl">{{dynamicUrl}}</a>.</div>
</body>
</html>