You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error Cannot find module '!!style-loader?injectType=lazyStyleTag!css-loader!sass-loader!../../scss-variables/light.scss' or its corresponding type declarations.
The text was updated successfully, but these errors were encountered:
Internal server error: Failed to resolve import "!!style-loader?injectType=lazyStyleTag!css-loader!sass-loader!../src/assets/scss/light.scss" from ".storybook/preview.ts". Does the file exist?
I had the same issue in Storybook 8.3
After doing the following, the issue was resoved:
create styles.d.ts in path/to/src (for me /src/ is a sibling to .storybook
in that file add the following: declare module "*.scss" { const content: Record<string, string>; }
NOTE: after doing this, I also had to declare module .mdx
Now, add the following under compilerOptions to your tsconfig.ts file which sits in the .storybook directory: "types": ["../src/styles.d.ts"]
Final note: Storybook 8 no longer needs sass-loader, style-loader, css-loader etc. (I'm using Angular, so your milleage might vary, but I can now import into preview.ts without any issues something like this: import someTheme from '../src/path/to/file/my-styles.scss;
Hi,
I get this error
Cannot find module '!!style-loader?injectType=lazyStyleTag!css-loader!sass-loader!../../scss-variables/light.scss' or its corresponding type declarations.
The text was updated successfully, but these errors were encountered: