Skip to content

Can't use a loader and component at the same time with createRemixStub #10567

@scottcorgan

Description

@scottcorgan

Reproduction

Run vitest . in the terminal. The test file is app/bug.test.jsx

https://stackblitz.com/edit/remix-run-remix-zrgjpk6f?file=README.md

System Info

System:
    OS: macOS 15.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 173.38 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.13.1 - ~/.nvm/versions/node/v22.13.1/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.13.1/bin/npm
    pnpm: 10.7.1 - ~/Library/pnpm/pnpm
    bun: 1.2.6 - ~/.bun/bin/bun
  Browsers:
    Chrome: 134.0.6998.166
    Safari: 18.1
  npmPackages:
    @remix-run/node: ^2.16.0 => 2.16.4

Used Package Manager

npm

Expected Behavior

I expect that the loader and the component would both get called in for the stubbed route.

Actual Behavior

If there's a loader, the component never gets called, just the loader . When I remove the loader, the component gets called.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions