fix: update image configuration
This commit is contained in:
parent
8a8cdeebb0
commit
011572b631
1 changed files with 20 additions and 12 deletions
|
|
@ -4,9 +4,14 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
||||||
module.exports = withBundleAnalyzer({
|
module.exports = withBundleAnalyzer({
|
||||||
// your Next.js configuration
|
// your Next.js configuration
|
||||||
images: {
|
images: {
|
||||||
domains: ["i.scdn.co"],
|
remotePatterns: [
|
||||||
|
{
|
||||||
|
protocol: "https",
|
||||||
|
hostname: "i.scdn.co",
|
||||||
|
},
|
||||||
|
],
|
||||||
// Add image optimization settings
|
// Add image optimization settings
|
||||||
formats: ['image/avif', 'image/webp'],
|
formats: ["image/avif", "image/webp"],
|
||||||
minimumCacheTTL: 60,
|
minimumCacheTTL: 60,
|
||||||
},
|
},
|
||||||
webpack: (config, options) => {
|
webpack: (config, options) => {
|
||||||
|
|
@ -33,19 +38,19 @@ module.exports = withBundleAnalyzer({
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: '/:path*',
|
source: "/:path*",
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
key: 'X-Content-Type-Options',
|
key: "X-Content-Type-Options",
|
||||||
value: 'nosniff',
|
value: "nosniff",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'X-Frame-Options',
|
key: "X-Frame-Options",
|
||||||
value: 'DENY',
|
value: "DENY",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'X-XSS-Protection',
|
key: "X-XSS-Protection",
|
||||||
value: '1; mode=block',
|
value: "1; mode=block",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -54,8 +59,11 @@ module.exports = withBundleAnalyzer({
|
||||||
// Add performance optimizations
|
// Add performance optimizations
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
compiler: {
|
compiler: {
|
||||||
removeConsole: process.env.NODE_ENV === 'production' ? {
|
removeConsole:
|
||||||
exclude: ['error', 'warn'],
|
process.env.NODE_ENV === "production"
|
||||||
} : false,
|
? {
|
||||||
|
exclude: ["error", "warn"],
|
||||||
|
}
|
||||||
|
: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue