Commit ddd30787 authored by Marc MacLeod's avatar Marc MacLeod Committed by Tim Neutkens

expose buildId to custom webpack configs (#3001)

* expose buildId to custom webpack configs

* update readme to include buildId in option object
parent 362fcf91
...@@ -934,7 +934,7 @@ In order to extend our usage of `webpack`, you can define a function that extend ...@@ -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) // (But you could use ES2015 features supported by your Node.js version)
module.exports = { module.exports = {
webpack: (config, { dev }) => { webpack: (config, { buildId, dev }) => {
// Perform customizations to webpack config // Perform customizations to webpack config
// Important: return the modified config // Important: return the modified config
......
...@@ -335,7 +335,7 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet ...@@ -335,7 +335,7 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet
if (config.webpack) { if (config.webpack) {
console.log(`> Using "webpack" config function defined in ${config.configOrigin}.`) 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) return webpack(webpackConfig)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment