Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

unplugin-vue-router/runtime needs to be included in optimizedDeps.include #705

@Ericlm

Description

@Ericlm

In my Vue 3 project, I recently tried to add Storybook with its tests ; but the thing is that they crash on first run, with a reload in unplugin-vue-router/runtime. I need to added it to the optimizeDeps.include in order to make it work.

I think it should work by default, without reload from unplugging-vue-router/runtime when running tests.

https://github.com/Ericlm/vitest-storybook

In this repro, you can use node benchmark.js to run a simple test that will fail the 1st time then pass.

In any case, it works with optimizeDeps: {include: ['unplugin-vue-router/runtime']}, but if think it should work even without including it.

See vitest-dev/vitest#8471

Metadata

Metadata

Assignees

No one assigned

    Labels

    has workaroundhas a temporary fix to get around the problem⚡️ enhancementimprovement over an existing feature👍 contribution welcomeothers are welcome to implement/fix this🙏 help wantedhelp in this issue is welcome

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions