fix: basepath did not read from the environment variable (#24870)

This commit is contained in:
17hz 2025-09-01 13:50:33 +08:00 • committed by GitHub
commit f11131f8b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 10 deletions

View file

@ -1,4 +1,3 @@
const { basePath, assetPrefix } = require('./utils/var-basePath')
const { codeInspectorPlugin } = require('code-inspector-plugin')
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
@ -24,8 +23,7 @@ const remoteImageURLs = [hasSetWebPrefix ? new URL(`${process.env.NEXT_PUBLIC_WE
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath,
assetPrefix,
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
webpack: (config, { dev, isServer }) => {
if (dev) {
config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }))