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.

Missing stories & TailwindCSS JIT not triggered

See original GitHub issue

When I start Storybook it starts with some stories but not every story. After some random event, something triggers and the rest of the stories appear and TW kicks in. I have no idea what triggers it. Sometimes it happens right after the regular start, letโ€™s say 1sec after. Sometimes it triggers after I start navigating the storybook, and sometimes it just never happen and Iโ€™m stuck.

The event that show up is [vite] new dependencies found: ... , but what makes it trigger sometimes and sometimes not. I mean I donโ€™t randomly add or remove a dependency.

So I donโ€™t know if itโ€™s the vite builder itself or vite, I hope you can help.

Start logs
info @storybook/react v6.3.1
info 
info => Loading presets
info Found existing addon "@storybook/addon-actions", skipping.

info => Using cached manager
Pre-bundling dependencies:
  tslib
  connected-react-router
  react
  react-dom
  react-intl
  (...and 113 more)
(this will be run only when your dependencies or config have changed)
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                   โ”‚
โ”‚   Storybook 6.3.1 started                         โ”‚
โ”‚   3.76 s for preview                              โ”‚
โ”‚                                                   โ”‚
โ”‚    Local:            http://localhost:6006/       โ”‚
โ”‚    On your network:  http://192.168.1.40:6006/    โ”‚
โ”‚                                                   โ”‚
โ”‚   A new version (6.3.6) is available!             โ”‚
โ”‚                                                   โ”‚
โ”‚   Upgrade now: npx sb@latest upgrade              โ”‚
โ”‚                                                   โ”‚
โ”‚   Read full changelog: https://git.io/fhFYe       โ”‚
โ”‚                                                   โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
After random event
3:13:11 PM [vite] new dependencies found: storybook-addon-intl, updating...
3:13:14 PM [vite] โœจ dependencies updated, reloading page...

warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
3:13:18 PM [vite] new dependencies found: @tippyjs/react/headless, updating...
3:13:19 PM [vite] โœจ dependencies updated, reloading page...
3:13:21 PM [vite] new dependencies found: @storybook/addon-actions, updating...
3:13:22 PM [vite] โœจ dependencies updated, reloading page...

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12

github_iconTop GitHub Comments

3reactions
JesusTheHuncommented, Aug 6, 2021

Tailwind requires no setup at all. Just include the Tailwind CSS in the app and youโ€™re good to go. So in my .storybook/preview.js I have import "../src/styles/css/tailwind.css". Thatโ€™s it

1reaction
JesusTheHuncommented, Aug 6, 2021

Nothing fancy

  async viteFinal(config) {
    config.plugins.push(tsconfigPaths(), svgr());
    config.optimizeDeps.include.push(
      'storybook-addon-intl',
      '@storybook/addon-actions',
      '@tippyjs/react/headless'
    );
    return config;
  },
Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing stories & TailwindCSS JIT not triggered #82 - GitHub
When I start Storybook it starts with some stories but not every story. After some random event, something triggers and the rest of...
Read more >
Tailwind css classes not showing in Storybook build
When running build-storybook the components are rendered with the tailwind classes. Unfortunately, when I build storybook and run the createย ...
Read more >
Just-in-Time Mode - Tailwind CSS
Since JIT mode generates your CSS on-demand by scanning your template files, it's crucial that you configure the purge option in your tailwind.config.js...
Read more >
How to enable Tailwind JIT compilation mode in your Angular ...
Setting up Tailwind JIT ยท Install tailwind as a dependency. Copy. npm i tailwindcss ยท Create the tailwind config file. Copy. npx tailwindcss...
Read more >
Tailwind setup how to? - Statamic Forum
But my Tailwind CSS is not working. ... your templates for changes while being edited so the TW JIT compiler can generate any...
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