histoire-dev / histoire

⚡ Fast and beautiful interactive component playgrounds, powered by Vite
https://histoire.dev
MIT License
3.19k stars 191 forks source link

TailwindCSS Logs spam the console #501

Open Steellgold opened 1 year ago

Steellgold commented 1 year ago

Describe the bug

When you edit a file or launch the project it displays all the Tailwind CSS style. However, when you import another CSS than Tailwind it does not

image

Tested with NPM and PNPM. I'm on Svelte: https://github.com/Virtual-Royaume/Royaume-Frontend/blob/main/histoire.setup.ts

Reproduction

When you import via a history-setup.ts in histoire.config.ts

import "$lib/styles/tailwind.css";
import { defineConfig } from "histoire";
import { HstSvelte } from "@histoire/plugin-svelte";

export default defineConfig({
  plugins: [
    HstSvelte()
  ],
  setupFile: "./histoire.setup.ts",
  viteNodeInlineDeps: [
    /clsx/
  ]
});

System Info

System:
  OS: Windows 10 10.0.19045
  CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
  Memory: 7.12 GB / 15.95 GB
Binaries:
  Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
  npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
  Edge: Spartan (44.19041.1266.0), Chromium (111.0.1661.54)
npmPackages:
  vite: ^4.2.1 => 4.2.1

Used Package Manager

pnpm

Validations

Steellgold commented 1 year ago

@Bluzzi has same error

afif-hh commented 1 year ago

same with me with nuxt 3

andreapply commented 1 year ago

This is related to https://github.com/histoire-dev/histoire/issues/557, JSDOM fails at parsing the CSS with the custom tailwind at-rules and spits out the entire tailwind config.

mariolang-schmalz commented 1 year ago

I just migrated from storybook to histoire for a vue3 component library and have the same error where it prints the tailwind output to the console. Does anybody have a fix for that?