question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Adding builder-vite to main config file launches actual app instead of playground

See original GitHub issue

What version of vite are you using?

3.0.0

System info and storybook versions

System: OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa) CPU: (16) x64 Intel® Core™ i7-10700 CPU @ 2.90GHz Binaries: Node: 16.15.1 - /usr/bin/node Yarn: 1.22.18 - /usr/bin/yarn npm: 8.11.0 - /usr/bin/npm

Describe the Bug

Hello, I have created a minimal repo here to reproduce the bug. Here is how to do it:

Steps: 1- Clone the repo 2- Execute yarn inside the repo 3- Execute yarn storybook inside the repo 4- Visit http://localhost:6006/ and see that the storybook playground is working just fine 5- Stop yarn storybook 6- Go to .storybook/main.ts 7- Uncomment lines 10-12 to enable builder-vite 8- Relaunch yarn storybook 9- The page hosted at localhost:6006 now displays the actual app instead of the playground

Link to Minimal Reproducible Example

: https://github.com/SamuelPoulin/vite-react-typescript-storybook-minimal

Participation

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
IanVScommented, Jul 21, 2022

Thanks for providing a reproduction, @SamuelPoulin, that was super helpful since I don’t experience this in my own app or in the examples in this repo (I don’t know why). I’ve found the reason this is happening, and we should have a new version with a fix out soon.

1reaction
IanVScommented, Jul 26, 2022

Thanks, I screwed up the config it seems. For now, you can work around this by using config.appType = 'custom' in viteFinal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vite - Storybook
Storybook Vite builder bundles your components and stories with Vite, a fast ESM bundler. For applications built with Vite: it allows reusing the...
Read more >
Przemek Spaczek (@przemekspaczek) / Twitter
Its main purpose is to bundle JavaScript files for usage in a browser, ... Two releases today: - 3.1.5 (stable) - bug fixes...
Read more >
cannot read properties of undefined (reading 'module')
I cannot find the error TypeError: Cannot read properties of undefined ... inside the app.routing.module.ts file, or wherever you're setting up your routes:....
Read more >
Vite 3.0 is out!
Today, 16 months from the v2 launch we are happy to announce the release of Vite 3. We decided to release a new...
Read more >
Stories are not sorted by their export (in production) #15574
Describe the bug In production, stories are not sorted according to their export instead, they are sorted alphabetically. How they should be sorted...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found