@import '~@/styles/defaults.scss';
This fails when I run npm run storybook
I added a scss
rule in my .storybook/webpack.config.js
to get this to work.
const path = require('path');
module.exports = (storybookBaseConfig, configType, defaultConfig) => {
defaultConfig.module.rules.push({
test: /\.scss$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader'
],
});
return defaultConfig;
};
@chovy did you solve the problem?
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
No, I did not solve the problem.
Adding a custom webpack config as @nickdandakis did should solve this.
Maybe @pksunkara has something else to add.
Yeah, what @nickdandakis did should work. I don't see any other issue with this.
馃憤
same problem
@chovy did you solve the problem?
@wuweijia I recently ran into this same problem. @nickdandakis's solution above worked for me. Just make sure you remember to yarn add --dev vue-style-loader css-loader sass-loader
.
It's probably worth noting that Storybook's documentation about extend mode did not work.
Would be great if you could PR to docs your findings
@wuweijia I recently ran into this same problem. @nickdandakis's solution above worked for me. Just make sure you remember to
yarn add --dev vue-style-loader css-loader sass-loader
.It's probably worth noting that Storybook's documentation about extend mode did not work.
I have fixed this problem. Thank you
Most helpful comment
I added a
scss
rule in my.storybook/webpack.config.js
to get this to work.