_Please make sure you have read the submission guidelines before posting an issue_
Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.
I expect that a library angular components running storybook will load scss files like it does if i just ran the storybook configs myself
The component gets compiled but all the scss files are not created/imported.
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Please provide detailed steps for reproducing the issue.
echo "p { background-color: red; }" >> libs/ui-kit/scss/src/lib/test-scss/test-scss.component.scssThe component component should have a red background but does not.
I found that if I just delete the webpack.config.js it starts to work so I think there is an issue with the webpack config or its just not needed
I also noticed that.
Another solution is, to just remove the following parts in the webpack.config.js in the .storybook folder:
let scssLoader = config.module.rules.find(i => !!'a.scss'.match(i.test));
if (scssLoader && scssLoader.use) {
scssLoader.use = ['to-string-loader', ...scssLoader.use];
}
let htmlLoader = config.module.rules.find(i => !!'a.html'.match(i.test));
if (htmlLoader) {
htmlLoader.loader = 'html-loader';
}
The webpack config changes were there to workaround an issue that has since been fixed in storybook.
The fix is merged: https://github.com/nrwl/nx/pull/2128
Most helpful comment
The fix is merged: https://github.com/nrwl/nx/pull/2128