Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Apply Image loader
Browse files Browse the repository at this point in the history
  • Loading branch information
highjun committed Feb 28, 2024
1 parent 3f61a4d commit 633e02c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
3 changes: 2 additions & 1 deletion data/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const meta: { [key: string]: any } = {
{ href: '/members', title: 'Members' },
{ href: '/courses', title: 'Courses' },
{ href: 'https://brunch.co.kr/@kaisticlab', title: 'Blog' },
]
],
imageLoader: "https://ickaist.imgix.net/"
}

export default meta;
29 changes: 21 additions & 8 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
import { PHASE_PRODUCTION_BUILD, PHASE_EXPORT } from "next/constants.js"

const nextConfig = (phase, { defaultConfig }) => {
const baseconfig = {
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
})
return config
},
output: 'export'
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
})
return config
},
output: 'export'
}
if (phase === PHASE_PRODUCTION_BUILD | phase === PHASE_EXPORT) {
console.log("This is Deployment Server!")
baseconfig['images'] = {
deviceSizes: [180, 640, 750, 828, 900, 1080, 1200, 1920, 2048, 3840],
loader: 'imgix',
path: 'https://ickaist.imgix.net/',
}
}
return baseconfig
};

export default nextConfig;

0 comments on commit 633e02c

Please sign in to comment.