UNPKG

@hashicorp/next-optimized-images

Version:

Automatically optimize images used in next.js projects (jpeg, png, gif, svg).

18 lines (15 loc) 439 B
const { getFileLoaderOptions } = require('../file-loader') /** * Build options for the webpack lqip loader * * @param {object} nextConfig - next.js configuration * @param {boolean} isServer - if the build is for the server * @returns {object} */ const getLqipLoaderOptions = (nextConfig, isServer) => ({ ...getFileLoaderOptions(nextConfig, isServer), ...(nextConfig.lqip || {}), }) module.exports = { getLqipLoaderOptions, }