twopluszero / next-images

Import images in Next.js (supports jpg, jpeg, svg, png and gif images)
MIT License
949 stars 67 forks source link

How do you set other configs not related to this module?? #54

Closed OZZlE closed 4 years ago

OZZlE commented 4 years ago

For example: https://www.npmjs.com/package/nextjs-basic-auth-middleware

Requires next.config.js:

module.exports = {
    experimental: {
        documentMiddleware: true
    }
}    

// or

module.exports = (phase, { defaultConfig }) => {
  return {
    experimental: {
        documentMiddleware: true
    }
  }
} 
OZZlE commented 4 years ago

Seems like the options are sent down as well so this should work??

const withImages = require('next-images')
module.exports = withImages({
  experimental: {
    documentMiddleware: true
  }
})

Even though this option is not related to withImages.. If that is the case would be good to have in Readme :)