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

expose buildId to custom webpack configs #3001

merged 2 commits into from Sep 27, 2017

Conversation

marbemac
Copy link
Contributor

@marbemac marbemac commented Sep 27, 2017

It's useful to have the buildId in the custom webpack configuration.

Our specific use case is that we're using https://github.com/jmshal/webpack-bugsnag-plugin to automatically upload our sourcemap to bugsnag on build. To do that, we need to provide an "appVersion" (buildId basically), and that "appVersion" needs to be the same value that we provide to the bugsnag library when we initialize it on app start (we do this in _document.js). We are already using buildId in to initialize bugsnag on app start, so this would tie the two together and allow us to connect source maps with specific production builds.

I'm sure there are other use cases as well!

Copy link
Member

@timneutkens timneutkens left a comment

Looks good! we should document it in the readme though. Here: https://github.com/zeit/next.js#customizing-webpack-config

@marbemac
Copy link
Contributor Author

@marbemac marbemac commented Sep 27, 2017

Done and done!

Copy link
Member

@timneutkens timneutkens left a comment

👌

@timneutkens
Copy link
Member

@timneutkens timneutkens commented Sep 27, 2017

Thanks!

@timneutkens timneutkens merged commit ddd3078 into vercel:master Sep 27, 2017
2 of 3 checks passed
chuyik pushed a commit to chuyik/next.js that referenced this issue Oct 19, 2017
* expose buildId to custom webpack configs

* update readme to include buildId in option object
@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants