Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose buildId to custom webpack configs #3001

Merged
merged 2 commits into from Sep 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server/build/webpack.js
Expand Up @@ -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)
}