Next-plugins: next-sass: CSS is not included when running build for all modules.

Created on 8 May 2018  路  4Comments  路  Source: vercel/next-plugins

Expected Behavior


running yarn build with @zeit/next-sass and using css-modules should result in ALL css being compiled and available in the build site.

Current Behavior


That's not the case. Only CSS for a single page / component is included, everything else is unstyled.

Steps to Reproduce (for bugs)


  1. clone this repo: https://github.com/Kyle-Mendes/next-sass-modules
  2. run yarn build
  3. run yarn start
  4. visit: localhost:3000/

    • The button may or may not be pink

  5. visit localhost:3000/test

    • The headline may or may not be large and green.

Likely, the button is unstyled and the headline is styled.

My main project has hundreds of components, and right now, only one style is applied for the entire site. If components in the example was larger, there would still be only one styled component.

Most helpful comment

Did you upgrade to the latest version?

All 4 comments

Note that this issue exists when using the configuration in #168 as well.

the same issue when I use next-less without cssModule.

Did you upgrade to the latest version?

upgrade next-less to the latest version solved my problem, thank you very much!

Was this page helpful?
0 / 5 - 0 ratings