mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
Enable source map for development
This commit is contained in:
@@ -540,7 +540,7 @@ const BLOG = {
|
||||
process.env.ENABLE_CACHE ||
|
||||
process.env.npm_lifecycle_event === 'build' ||
|
||||
process.env.npm_lifecycle_event === 'export', // 在打包过程中默认开启缓存,开发或运行时开启此功能意义不大。
|
||||
isProd: process.env.VERCEL_ENV === 'production', // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) isProd: process.env.VERCEL_ENV === 'production' // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables)
|
||||
isProd: process.env.VERCEL_ENV === 'production', // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables)
|
||||
BUNDLE_ANALYZER: process.env.ANALYZE === 'true' || false, // 是否展示编译依赖内容与大小
|
||||
VERSION: process.env.NEXT_PUBLIC_VERSION // 版本号
|
||||
}
|
||||
|
||||
@@ -165,6 +165,10 @@ const nextConfig = {
|
||||
'themes',
|
||||
THEME
|
||||
)
|
||||
// Enable source maps in development mode
|
||||
if (process.env.NODE_ENV_API === 'development') {
|
||||
config.devtool = 'source-map'
|
||||
}
|
||||
return config
|
||||
},
|
||||
experimental: {
|
||||
@@ -181,7 +185,6 @@ const nextConfig = {
|
||||
},
|
||||
publicRuntimeConfig: {
|
||||
// 这里的配置既可以服务端获取到,也可以在浏览器端获取到
|
||||
NODE_ENV_API: process.env.NODE_ENV_API || 'prod',
|
||||
THEMES: themes
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user