Open nicolae536 opened 1 year ago
If maybe I configured something wrong let me know. But it seems reproducible in stackblitz
Hi @nicolae536,
After investigating your issue and experimenting with some workarounds, it seems there may be a configuration problem. I attempted to reproduce the bug, and in my case, it's working fine. You can take a look at the working example here: https://github.com/Rupesh-Lal/storybook-demo/tree/master.
npm install sass --save
.main.js
:// REMOVE THIS
config.module.rules.push({
test: /\.scss$/,
use: ["style-loader", "css-loader", "sass-loader"],
include: path.resolve(__dirname, "../"),
});
// REMOVE THIS
https://storybook.js.org/recipes/sass https://stackoverflow.com/questions/67194194/import-scss-file-is-not-working-inside-storybook-file https://github.com/storybookjs/storybook/issues/12464
Describe the bug
I'm having the following angular component styles which work in the normal project but don't work in storybook angular
If I understand correctly when we interpolate js variables with scss it's not compiled correctly in storybook. The resulted styles in storybook are.
You can see that the resulted style in storybook when interpolating js is not correct. But the first compiled style is fine which uses just scss.
To Reproduce
Here is see the button story:
https://stackblitz.com/edit/github-xxncqv?file=src/stories/button.component.ts
It's very simple you just need a mixin and a component with styles interpolating js with css. Then if you look for the generated styles you see that the scss compilation didn't took place
System
Additional context
No response