mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Add a `runAfterProductionCompile` hook in next.config.js that executes after production build compilation finishes, but before running post-compilation tasks like type checking and static page generation. This hook provides access to project metadata including the project directory and build output directory, making it useful for third-party to collect build outputs like sourcemaps.
13 lines
266 B
TypeScript
13 lines
266 B
TypeScript
import { NextConfig } from 'next'
|
|
import { after } from './after'
|
|
|
|
const nextConfig: NextConfig = {
|
|
compiler: {
|
|
runAfterProductionCompile: async ({ distDir, projectDir }) => {
|
|
await after({ distDir, projectDir })
|
|
},
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|