title: How to use next-css in next.config.js in combination with custom server Express
body: <p>I have a nextJS app using express as custom server. I want to use next-css to include css files for styling. How do i setup this configuration? </p>
  
  <p>Have created a next.config.js file containing:</p>
  
  <pre><code>// next.config.js
  const withCSS = require('@zeit/next-css')
  module.exports = withCSS()
  </code></pre>
  
  <p>My server.js files is based on the example given here:
  <a href="https://github.com/zeit/next.js/blob/master/examples/custom-server-express/server.js" rel="nofollow noreferrer">https://github.com/zeit/next.js/blob/master/examples/custom-server-express/server.js</a></p>
  
  <p>In package.json i'm including following:</p>
  
  <pre><code>"@zeit/next-css": "^1.0.1",
  "next": "latest",
  "react": "16.4.2",
  "react-dom": "16.4.2",
  "webpack": "^4.22.0"
  </code></pre>
  
  <p>In the file i'm importing the .css file using <code>import './timeline.css'</code>
  The css file contains:</p>
  
  <pre><code>.example {
      font-size: 50px;
    }
  </code></pre>
  
  <p>The error displayed in the terminal is:</p>
  
  <pre><code>&gt; Failed to build
  { Error: (client) ./components/timeline/timeline.css 1:0
  Module parse failed: Unexpected token (1:0)
  You may need an appropriate loader to handle this file type.
  &gt; .example {
  |     font-size: 50px;
  |   }
   @ ./components/timeline/timeline.js 23:0-25
  .....
  errors: 
     [ '(client) ./components/timeline/timeline.css 1:0\nModule parse failed: Unexpected token (1:0)\nYou may need an appropriate loader to handle this file type.\n&gt; .example {\n|     font-size: 50px;\n|   }\n @ ./components/timeline/timeline.js 23:0-25\n @ ./pages/calender.js\n @ multi ./pages/calender.js',
  ....
  </code></pre>
  
  <p>To me it looks like the next.config.js is not loaded correctly. I'm in doubt on if i need to pass the configuration as an object to <code>const app = next({ dev })</code> or the next.config.js is loaded but the next-css is not working. </p>