doczjs / docz

✍ It has never been so easy to document your things!
https://docz.site
MIT License
23.6k stars 1.46k forks source link

Setup on NextJs with SSG #1618

Open joeleduardo opened 3 years ago

joeleduardo commented 3 years ago

Hello im trying to setup docz in a next js project but im getting this error after run npm run docz:dev:

Generating development JavaScript bundle failed

Style Loader Invalid Options

options should NOT have additional properties

File: ../components/button/button.module.scss

Basically i added a gatsby-config.js file to set up the gatsby-plugin-sass plugin and im stuck in this step. any ideas

As side comment im running my app with Next Js SSG (Static Site Generation)

timlogemann commented 3 years ago

I went through the same process a while ago. I ended up with the following configuration for gatsby-plugin-sass@3.2.0:


{
  resolve: 'gatsby-plugin-sass',
  options: {
    useResolveUrlLoader: true,
    sassOptions: {
      includePaths: ['../', '../src', '../src/styles'],
    },
  },
},```

One thing to note is that I put all components and pages for Next.js inside a src/ directory, so I had to do some extra trickery with the includePaths.