File tree 4 files changed +4
-7
lines changed
4 files changed +4
-7
lines changed Original file line number Diff line number Diff line change
1
+ BASE_PATH = /Next.js-and-GitHub-Pages-Example
Original file line number Diff line number Diff line change @@ -33,3 +33,5 @@ yarn-error.log*
33
33
34
34
# typescript
35
35
* .tsbuildinfo
36
+
37
+ .env
Original file line number Diff line number Diff line change 2
2
* @type {import('next').NextConfig }
3
3
*/
4
4
const nextConfig = {
5
- publicRuntimeConfig : {
6
- basePath : "/Next.js-and-GitHub-Pages-Example" ,
7
- } ,
8
5
output : "export" ,
9
6
images : {
10
7
loader : "akamai" ,
Original file line number Diff line number Diff line change @@ -2,11 +2,8 @@ import type { NextPage } from "next";
2
2
import Head from "next/head" ;
3
3
import Image from "next/image" ;
4
4
import styles from "../styles/Home.module.css" ;
5
- import getConfig from "next/config" ;
6
5
7
6
const Home : NextPage = ( ) => {
8
- const { publicRuntimeConfig } = getConfig ( ) ;
9
-
10
7
return (
11
8
< div className = { styles . container } >
12
9
< Head >
@@ -65,7 +62,7 @@ const Home: NextPage = () => {
65
62
Powered by{ " " }
66
63
< span className = { styles . logo } >
67
64
< Image
68
- src = { `${ publicRuntimeConfig . basePath } " /vercel.svg" ` }
65
+ src = { `${ process . env . BASE_PATH } /vercel.svg` }
69
66
alt = "Vercel Logo"
70
67
width = { 72 }
71
68
height = { 16 }
You can’t perform that action at this time.
0 commit comments