const withImages = require('next-images')

module.exports = {
  ...withImages(),
  // Target must be serverless (for use with netlify)
  target: "serverless",
};

module.exports = {
  // Error: Cannot find module 'ts-tiny-invariant'
  // netlify is working on it...
  webpack: (config, { isServer } ) => {
    if (isServer) {
      // When working on webpack5 there was this runtime-error:
      // Module "ts-tiny-invariant" was not found. PR...
      config.externals.push('ts-tiny-invariant')
    }
    return config
  },
  // Target must be serverless (for use with netlify)
  target: "serverless",
};

fix serverless build, remove obsolete use of next-images