If you are reporting a bug or requesting support, start here:
I use style loader, css loader, sass loader in my webpack config for storybook. My component in storybook does not have styles
I use React with SASS. This is my webpack config
const path = require('path')
const autoprefixer = require('autoprefixer')
const postcssNormalize = require('postcss-normalize')
const srcPath = path.resolve(__dirname, '../../../app/src')
module.exports = {
module: {
rules: [
{
test: /\.scss$/,
use: [
{
loader: 'style-loader'
},
{
loader: "css-loader",
options: {
sourceMap: true
}
},
{
loader: 'postcss-loader',
options: {
plugins: [autoprefixer, postcssNormalize],
sourceMap: true
},
},
{
loader: 'resolve-url-loader'
},
{
loader: "sass-loader",
options: {
includePaths: [srcPath],
sourceMap: true
}
}
]
})
},
{
test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|woff|woff2)(\?.*)?$/,
exclude: /node_modules/,
loader: 'file-loader',
options: {
name: '[path][name]-[hash].[ext]',
outputPath: 'images/'
},
}
]
}
};
// code here
End bug report support request - delete the rest below
If you are creating a issue to track work to be completed, start here:
_Please provide a description of the work to be completed here - Include some context as to why something needs to be done and link any related tickets._
_Please list the file(s) a contributor needs to figure out where to start work and include any docs or tutorials that may be applicable._
_Please include a checklist of the requirements necessary to close this ticket. The work should be narrowly scoped and limited to a few hours worth by an experienced developer at the most._
_Add yourself and/or people who are familiar with the code changes and requirements. These people should be able to review the completed code._
End work issue - please tag this issue with the correct status and type labels
Looks like you missed style-loader there
I added style loader but it still does not work
@igor-dv any more details you need in order to resolve this issue? please let me know
If you have a reproduction, it will be helpful
i figured it out. I forgot to set modules: true in css-loader :face_palm: