Skip to content

404 for shared libs when host is Nuxt@4 (with app folder) #727

@denisturenko

Description

@denisturenko

Versions

  • vite-plugin-federation: 1.4.1
  • vite: 4.4.11
  • nuxt: 4.2.0

Reproduction

https://github.com/denisturenko/vite-plugin-federation-nuxt4-issue

Steps to reproduce

run remote

cd vue3-remote/
npm install
npm run build
npm run preview

run host

cd nuxt-host/
npm install
npm run dev

Navigate to http://localhost:3000/ and open console

................

The issue is the following:

Nuxt@4 uses URLs like /_nuxt/@fs/.../node_modules/....

The plugin creates a URL like /_nuxt/node_modules/..., and the server responds with 404.

What is Expected?

Expected what shared script will be loaded

What is actually happening?

The plugin creates a URL like /_nuxt/node_modules/..., and the server responds with 404.

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