Skip to content

Problem with ssr in nuxt project use antd #73

Open
@Tr-anh99

Description

@Tr-anh99

Environment Details

Framework: Nuxt 3
Plugin: ant-design-vue-nuxt
Current Setup: The project includes tag wrapping the component in app.vue, which is causing routing issues
File Structure: Using Ant Design Vue layout components (a-layout, a-layout-sider, a-layout-header, a-layout-content, a-layout-footer)

Technical Analysis

The Nuxt router is not recognizing pages properly because the component is wrapped in tags in app.vue
The application structure appears to be using Ant Design Vue layout components, but there's a conflict with Nuxt's routing system
Authentication API calls are failing with connection refused errors, suggesting either incorrect API URLs or server connectivity issues

Attempted Solutions
I've attempted to fix the routing issue by:

Creating a proper layout structure for Ant Design Vue
Moving the layout components to a dedicated layouts directory
Setting up proper page components in the pages directory

I use setup in https://github.com/antdv-community/antdv-nuxt-starter

Image

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions