1
0
Fork 0
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:
Marc MacLeod 2017-09-27 01:03:29 -05:00 committed by Tim Neutkens
parent 362fcf917a
commit ddd30787ef
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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)
}