storybookjs / builder-vite

A builder plugin to run and build Storybooks with Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] /.cache/.vite-storybook in the wrong location

KieranP opened this issue · comments

What version of vite are you using?

4.0.0

System info and storybook versions

System:
OS: macOS 13.2.1
CPU: (10) arm64 Apple M1 Pro
Binaries:
Node: 16.13.1 - ~/.asdf/installs/nodejs/16.13.1/bin/node
Yarn: 1.22.19 - ~/.asdf/installs/nodejs/16.13.1/.npm/bin/yarn
npm: 8.1.2 - ~/.asdf/plugins/nodejs/shims/npm
Browsers:
Safari: 16.3
npmPackages:
@storybook/addon-actions: ^7.0.0-beta.53 => 7.0.0-rc.3
@storybook/addon-essentials: ^7.0.0-beta.53 => 7.0.0-rc.3
@storybook/addon-interactions: ^7.0.0-beta.53 => 7.0.0-rc.3
@storybook/addon-links: ^7.0.0-beta.53 => 7.0.0-rc.3
@storybook/blocks: ^7.0.0-alpha.8 => 7.0.0-alpha.8
@storybook/svelte: ^7.0.0-beta.53 => 7.0.0-rc.3
@storybook/svelte-vite: ^7.0.0-beta.53 => 7.0.0-rc.3
@storybook/testing-library: ^0.0.14-next.1 => 0.0.14-next.1

Describe the Bug

I have my frontend code in /Work/app/frontend. But vite.config.ts, node_modules, and other things are in the root folder (/Work) and configured to find the JS/CSS in app/frontend.

Vite and other tools put caches and such in /Work/node_modules. So I would expect that Storybook would put it's .cache/.vite-storybook in the existing /Work/node_modules folder also.

Instead, it creates a new folder under /Work/app/frontend/node_modules . In otherwords, it putting the cache under the frontend source directory /Work/app/frontend instead of the root dir /Work

Link to Minimal Reproducible Example

No response

Participation

  • I am willing to submit a pull request for this issue.