From ddd30787efbf699beb873f07df5333f01c58ba83 Mon Sep 17 00:00:00 2001 From: Marc MacLeod Date: Wed, 27 Sep 2017 01:03:29 -0500 Subject: [PATCH] expose buildId to custom webpack configs (#3001) * expose buildId to custom webpack configs * update readme to include buildId in option object --- readme.md | 2 +- server/build/webpack.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 32cfe527..d4bee68f 100644 --- a/readme.md +++ b/readme.md @@ -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 diff --git a/server/build/webpack.js b/server/build/webpack.js index 3422cbf7..d080b178 100644 --- a/server/build/webpack.js +++ b/server/build/webpack.js @@ -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) }