sean
sean
Explore posts from servers
NNuxt
Created by sean on 9/18/2024 in #❓・help
Dynamic route returns 404 in production
Found the actually issue
nuxt build --preset github_pages
nuxt build --preset github_pages
5 replies
NNuxt
Created by sean on 9/18/2024 in #❓・help
Dynamic route returns 404 in production
Still having this issue
5 replies
NNuxt
Created by sean on 9/18/2024 in #❓・help
Dynamic route returns 404 in production
Still having this issue
5 replies
NNuxt
Created by sean on 9/18/2024 in #❓・help
Dynamic route returns 404 in production
My nuxtjs config looks like this right now:
import utwm from 'unplugin-tailwindcss-mangle/vite';

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
head: {
htmlAttrs: {
lang: 'en',
},
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
title: 'XXXXXXX',
meta: [
{
name: 'description',
content: 'XXXXXXXXX'
},
{
property: 'og:image',
content: '/logo.svg'
},
{
name: 'twitter:card',
content: 'summary_large_image'
},
{
name: 'twitter:image',
content: '/logo.svg'
},
],
}
},
routeRules: {
'/': {prerender: true, isr: 3600},
'/bot/**': {ssr: true},
'/bot': {redirect: '/'},
},
compatibilityDate: '2024-04-03',
devtools: {enabled: true},
modules: ['@nuxt/image', '@nuxtjs/robots', '@nuxtjs/tailwindcss', '@nuxtjs/plausible', '@pinia/nuxt', 'floating-vue/nuxt'],
css: [
'@/assets/css/main.css',
],
plausible: {
apiHost: 'https://xxxxxx',
autoOutboundTracking: true,
},
pinia: {
autoImports: ['defineStore', 'acceptHMRUpdate'],
},
vite: {
build: {
sourcemap: false
},
plugins: [
utwm(),
],
},
})
import utwm from 'unplugin-tailwindcss-mangle/vite';

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
head: {
htmlAttrs: {
lang: 'en',
},
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
title: 'XXXXXXX',
meta: [
{
name: 'description',
content: 'XXXXXXXXX'
},
{
property: 'og:image',
content: '/logo.svg'
},
{
name: 'twitter:card',
content: 'summary_large_image'
},
{
name: 'twitter:image',
content: '/logo.svg'
},
],
}
},
routeRules: {
'/': {prerender: true, isr: 3600},
'/bot/**': {ssr: true},
'/bot': {redirect: '/'},
},
compatibilityDate: '2024-04-03',
devtools: {enabled: true},
modules: ['@nuxt/image', '@nuxtjs/robots', '@nuxtjs/tailwindcss', '@nuxtjs/plausible', '@pinia/nuxt', 'floating-vue/nuxt'],
css: [
'@/assets/css/main.css',
],
plausible: {
apiHost: 'https://xxxxxx',
autoOutboundTracking: true,
},
pinia: {
autoImports: ['defineStore', 'acceptHMRUpdate'],
},
vite: {
build: {
sourcemap: false
},
plugins: [
utwm(),
],
},
})
5 replies