Storybook: @storybook/[email protected] funktioniert nicht mit dem Import in CSS in React-Scripts@^1

Erstellt am 21. Mai 2017  ·  3Kommentare  ·  Quelle: storybookjs/storybook

Wie ich in #1073 geschrieben habe (ich wurde gebeten, eine neue Ausgabe zu eröffnen):

Könnte mit #1027 verwandt sein

Aber es ist nicht kompatibel mit react-scripts@^1 wenn es um CSS geht. Wenn Sie CSS-Dateien haben, die andere CSS-Dateien importieren, bricht es mit diesem Fehler ab:

ERROR in ./~/css-loader?{"importLoaders":1}!./~/postcss-loader/lib?{"plugins":[null]}!./src/stories/blah.css
Module build failed: TypeError: Cannot read property 'postcss' of null

Codebeispiel:

/* a.css */
<strong i="12">@import</strong> "./b.css";
/* b.css */

:root {
  /* ... */
}
// Story file
import "./a.css";

Wenn weitere Informationen benötigt werden, sagen Sie es mir bitte.

babel / webpack bug compatibility with other tools

Hilfreichster Kommentar

Ich werde das prüfen.

Ich habe das Problem reproduziert.

Ich habe eine Lösung!

Alle 3 Kommentare

Danke @oriSomething! Wir schauen uns das an!

Ich werde das prüfen.

Ich habe das Problem reproduziert.

Ich habe eine Lösung!

Es sollte jetzt behoben sein:

Successfully published:
 - @storybook/[email protected]
 - @storybook/[email protected]
 - @storybook/[email protected]
 - @storybook/[email protected]
 - @storybook/[email protected]
 - @storybook/[email protected]
 - @storybook/[email protected]
 - @storybook/[email protected]
 - @storybook/[email protected]
 - @storybook/[email protected]
 - @storybook/[email protected]
War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

purplecones picture purplecones  ·  3Kommentare

levithomason picture levithomason  ·  3Kommentare

ZigGreen picture ZigGreen  ·  3Kommentare

dnlsandiego picture dnlsandiego  ·  3Kommentare

tlrobinson picture tlrobinson  ·  3Kommentare