From 5c2de336505807481e66606af557511ae6cc762e Mon Sep 17 00:00:00 2001 From: Garrit Franke Date: Wed, 7 Oct 2020 15:58:05 +0200 Subject: [PATCH] fix: nextjs asset hosting --- .github/workflows/deploy.yml | 2 +- next.config.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8844a94..c73fe94 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,7 +1,7 @@ on: push: branches: - - release + - master name: Deploy to Github Pages jobs: deploy: diff --git a/next.config.js b/next.config.js index 129c75e..ba74b6d 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,7 @@ +const isProd = process.env.NODE_ENV === 'production' + module.exports = { + assetPrefix: isProd ? 'https://slashdev.space' : '', webpack: function (config) { config.module.rules.push({ test: /\.md$/,