From cf94c66807c4f219c5c08d26c055de1d5fe6758c Mon Sep 17 00:00:00 2001 From: Pacharapol Withayasakpunt Date: Thu, 17 Dec 2020 19:23:19 +0700 Subject: [PATCH] try to make redirect work properly in static --- packages/nuxt/nuxt.config.ts | 2 ++ packages/nuxt/pages/blog/index.vue | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/nuxt/nuxt.config.ts b/packages/nuxt/nuxt.config.ts index eaf1878..9f644ae 100644 --- a/packages/nuxt/nuxt.config.ts +++ b/packages/nuxt/nuxt.config.ts @@ -8,6 +8,8 @@ const config = async (): Promise => { const theme = getTheme() return { + target: 'static', + // Global page headers (https://go.nuxtjs.dev/config-head) head: { title: theme.title, diff --git a/packages/nuxt/pages/blog/index.vue b/packages/nuxt/pages/blog/index.vue index fd5e2d3..961f073 100644 --- a/packages/nuxt/pages/blog/index.vue +++ b/packages/nuxt/pages/blog/index.vue @@ -7,10 +7,6 @@ import { Vue, Component } from 'nuxt-property-decorator' @Component({ async asyncData({ $axios }) { - if (process.static && typeof location !== 'undefined') { - location.reload() - } - const { result, count } = await $axios.$get('/api/q') return {