forked from bbc/react-transcript-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (36 loc) · 907 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// https://github.com/storybooks/storybook/issues/270#issuecomment-318101549
// this config augments the storybook one with support for css modules
// storybook does not have support for css modules out of the box
// if CRA were to be present, storybook webpack augment those configs
module.exports = {
module: {
rules: [
{
test: /\.module.(sa|sc|c)ss$/,
use: [
"style-loader",
{
loader: "css-loader",
options: { modules: true }
},
{
loader: "sass-loader",
options: { sourcemap: true }
}
]
},
{
test: /\.s(a|c)ss$/,
exclude: /\.module.(s(a|c)ss)$/,
use: [
"style-loader",
"css-loader",
{
loader: "sass-loader",
options: { sourcemap: true }
}
]
}
]
}
};