title: Can I use CSS Modules with Storybook 5 (React flavour)?
body: <p>I am trying to use Storybook v5.0 with my project and I am using React + Webpack4 + CSS Modules. ( I am not using CreateReactApp)</p>
  
  <p>My setup is quite simple, and I was able to setup Storybook without CSS modules fine. </p>
  
  <p>However if I try to edit the custom storybook webpack config to support CSS modules, it errors.</p>
  
  <p>When I run <code>npm run storybook</code> the error I get is:</p>
  
  <pre><code>ERROR in ./src/components/Test/index.css (./node_modules/css-loader/dist/cjs.js??ref--6-1!./node_modules/postcss-loader/src??postcss!./node_modules/style-loader!./node_modules/css-loader/dist/cjs.js??ref--9-1!./node_modules/postcss-loader/src!./src/components/Test/index.css)
  Module build failed (from ./node_modules/postcss-loader/src/index.js):
  SyntaxError
  
  (2:1) Unknown word
  
    1 |
  &gt; 2 | var content = require("!!../../../node_modules/css-loader/dist/cjs.js??ref--9-1!../../../node_modules/postcss-loader/src/index.js!./index.css");
      | ^
    3 |
    4 | if(typeof content === 'string') content = [[module.id, content, '']];
  </code></pre>
  
  <p>In my <code>package.json</code>:</p>
  
  <pre><code>"@storybook/addon-actions": "^5.0.0",
  "@storybook/addons": "^5.0.0",
  "@storybook/react": "^5.0.0",
  </code></pre>
  
  <p>My <code>.storybook/webpack.config.js</code> follows the example on their web site, and looks like this:</p>
  
  <pre><code>const path = require("path");
  
  const stylesLoaders = [
    "style-loader",
    {
      loader: "css-loader",
      options: {
        modules: true,
        localIdentName: "[path]__[local]--[hash:base64:5]"
      }
    },
    "postcss-loader"
  ];
  
  module.exports = {
    module: {
      rules: [
        {
          test: /\.css$/,
          loaders: stylesLoaders,
          include: path.resolve(__dirname, "../")
        }
      ]
    }
  };
  </code></pre>
  
  <p>Any help would be appreciated, as I'd like to use the latest version of Storybook!</p>