File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed
Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 5555 cache : ${{ steps.detect-package-manager.outputs.manager }}
5656 - name : Setup Pages
5757 uses : actions/configure-pages@v5
58- with :
59- # Automatically inject basePath in your Next.js configuration file and disable
60- # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
61- #
62- # You may remove this line if you want to manage the configuration yourself.
63- static_site_generator : next
58+
6459 - name : Restore cache
6560 uses : actions/cache@v4
6661 with :
Original file line number Diff line number Diff line change 11import type { NextConfig } from "next" ;
22
3- const isProd = process . env . NODE_ENV === 'production' ;
4-
53const nextConfig : NextConfig = {
64 /* config options here */
75 output : "export" ,
8- basePath : isProd ? "/traeweb1" : "" ,
6+ // Ensure basePath matches the repository name
7+ basePath : "/traeweb1" ,
8+ // Optional: assetPrefix usually defaults to basePath, but setting it explicitly can help
9+ assetPrefix : "/traeweb1/" ,
910 images : {
1011 unoptimized : true ,
1112 } ,
Original file line number Diff line number Diff line change 11"use client" ;
22
33import React , { useRef , useEffect } from "react" ;
4- import Editor , { useMonaco } from "@monaco-editor/react" ;
4+ import Editor , { useMonaco , loader } from "@monaco-editor/react" ;
55import { useTheme } from "next-themes" ;
66import { Loader2 } from "lucide-react" ;
77
8+ // Configure Monaco to use a reliable CDN (unpkg) to avoid issues in some regions
9+ loader . config ( {
10+ paths : {
11+ vs : "https://unpkg.com/monaco-editor@0.44.0/min/vs" ,
12+ } ,
13+ } ) ;
14+
815interface EditorProps {
916 value : string ;
1017 onChange : ( value : string ) => void ;
You can’t perform that action at this time.
0 commit comments