UNPKG

@vitbokisch/next-optimized-images

Version:

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

16 lines (13 loc) 424 B
import { getFileLoaderOptions } from '../file-loader.js' /** * 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 || {}), }) export { getLqipLoaderOptions }