feat: add asset prefix
Some checks failed
Deploy Website / build (push) Failing after 54s

This commit is contained in:
TheClashFruit 2024-04-21 17:12:00 +02:00
parent 6fdc97b98b
commit dbd5e1dbfa
Signed by: TheClashFruit
GPG key ID: 09BB24C34C2F3204
2 changed files with 12 additions and 1 deletions

View file

@ -18,6 +18,14 @@ jobs:
uses: https://github.com/pnpm/action-setup@v3.0.0
with:
version: 8
- uses: actions/cache@v4
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Build
run: |
pnpm install

View file

@ -1,6 +1,8 @@
const path = require('path');
const createMDX = require('@next/mdx');
const isProd = process.env.NODE_ENV === 'production';
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
@ -8,7 +10,8 @@ const nextConfig = {
pageExtensions: [ 'js', 'jsx', 'md', 'mdx', 'ts', 'tsx' ],
sassOptions: {
includePaths: [ path.join(__dirname, 'styles') ]
}
},
assetPrefix: isProd ? 'https://raw.theclashfruit.me/flint/website/pages' : undefined
};
module.exports = createMDX({