Open RezDev94 opened 1 year ago
Have the same issue
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?
But file exists.
Configuration: vue: 3.3.11, vite: 5.0.10 css-loader: 6.8.1 sass: 1.69.5 sass-loader: 13.3.2 storybook: 7.6.6 style-loader: 3.3.3
I had the same issue in Storybook 8.3 After doing the following, the issue was resoved:
declare module "*.scss" { const content: Record<string, string>; }
NOTE: after doing this, I also had to declare module .mdxNow, 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.