Skip to content

Commit

Permalink
config again
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoGytis committed Jan 25, 2024
1 parent 20f1bd7 commit 2c40fc8
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
/**
* @type {import('next').NextConfig}
*/
// const nextConfig = {
// output: "export",
// images: { unoptimized: true },
// };

const nextConfig = {
webpack: (config, options) => {
// config.module.rules.push({
// test: /\.svg/,
// use: {
// loader: 'svg-url-loader',
// },
// });
config.module.rules.push({
test: /\.(jpe?g|png|svg|eot|woff2?|ttf)$/i,
use: {
loader: 'file-loader',
options: {
name: '[path][name].[hash].[ext]',
publicPath: '/_next/static',
outputPath: 'static',
emitFile: !options.isServer,
},
},
});
return config;
output: "export",
// images: { unoptimized: true },
images: {
// limit of 25 deviceSizes values
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
// limit of 25 imageSizes values
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
// limit of 50 domains values (deprecated)
domains: [],
// path prefix for Image Optimization API, useful with `loader`
path: '/_next/image',
// loader can be 'default', 'imgix', 'cloudinary', 'akamai', or 'custom'
loader: 'default',
// file with `export default function loader({src, width, quality})`
loaderFile: '',
// disable static imports for image files
disableStaticImages: false,
// minimumCacheTTL is in seconds, must be integer 0 or more
minimumCacheTTL: 60,
// ordered list of acceptable optimized image formats (mime types)
formats: ['image/webp'],
// enable dangerous use of SVG images
dangerouslyAllowSVG: false,
// set the Content-Security-Policy header
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
// sets the Content-Disposition header (inline or attachment)
contentDispositionType: 'inline',
// limit of 50 objects
remotePatterns: [],
// when true, every image will be unoptimized
unoptimized: false,
},
};

Expand Down

0 comments on commit 2c40fc8

Please sign in to comment.