Skip to content

Adding @module-federation/vite breaks vanilla @tanstack start project #7032

@jsg2021

Description

@jsg2021

Which project does this relate to?

Start

Describe the bug

After generating a new project, adding @module-federation/vite breaks the build.

Similar to #4516

Your Example Website or App

https://github.com/jsg2021/tanstack-start-module-federation-issue

Steps to Reproduce the Bug or Issue

run build

Expected behavior

Build succeeds with normal output plus federated assets

This check probably needs to be more sophisticated:

if (bundleEntry.isEntry) {
if (entryChunk) {
throw new Error(
`multiple entries detected: ${entryChunk.fileName} ${bundleEntry.fileName}`,
)
}

We can produce multiple "entry" points... Is there a way to flag which one we want in this context?

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.167.6
  • OS: macOS/Linux
  • Browser: irrelevant, in terminal.
  • Bundler: Vite
  • Bundler Version: 7.3.1

Additional context

No response

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