Skip to content

Commit

Permalink
build: fix assets path
Browse files Browse the repository at this point in the history
  • Loading branch information
nnecec committed Mar 21, 2024
1 parent 0f96a33 commit 8abf7d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion apps/website/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const isProd = process.env.NODE_ENV === 'production'
const prefix = '/palette'

console.log(process.env.NODE_ENV)

/** @type {import('next').NextConfig} */
const nextConfig = {
assetPrefix: isProd ? prefix : undefined,
/**
* Set base path. This is the slug of your GitHub repository.
*
Expand All @@ -27,6 +28,9 @@ const nextConfig = {
* @see https://nextjs.org/docs/app/building-your-application/deploying/static-exports
*/
output: 'export',
publicRuntimeConfig: {
staticFolder: isProd ? prefix : undefined,
},
reactStrictMode: true,
}

Expand Down
4 changes: 3 additions & 1 deletion apps/website/src/components/palette/logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import Image from 'next/image'

import { Link } from '@nextui-org/react'

import logo from '~/assets/logo.svg'

const MotionImage = motion(Image)

export function PaletteFooter() {
Expand All @@ -24,7 +26,7 @@ export function PaletteFooter() {
className="relative z-10"
height={120}
initial={{ x: 0 }}
src="/assets/logo.svg"
src={logo}
width={120}
/>
<motion.div
Expand Down

0 comments on commit 8abf7d4

Please sign in to comment.