mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
expose buildId to custom webpack configs (#3001)
* expose buildId to custom webpack configs * update readme to include buildId in option object
This commit is contained in:
parent
362fcf917a
commit
ddd30787ef
|
@ -934,7 +934,7 @@ In order to extend our usage of `webpack`, you can define a function that extend
|
|||
// (But you could use ES2015 features supported by your Node.js version)
|
||||
|
||||
module.exports = {
|
||||
webpack: (config, { dev }) => {
|
||||
webpack: (config, { buildId, dev }) => {
|
||||
// Perform customizations to webpack config
|
||||
|
||||
// Important: return the modified config
|
||||
|
|
|
@ -335,7 +335,7 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet
|
|||
|
||||
if (config.webpack) {
|
||||
console.log(`> Using "webpack" config function defined in ${config.configOrigin}.`)
|
||||
webpackConfig = await config.webpack(webpackConfig, { dev })
|
||||
webpackConfig = await config.webpack(webpackConfig, { buildId, dev })
|
||||
}
|
||||
return webpack(webpackConfig)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue