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

Switching react into production mode for production builds. #4048

Merged
merged 2 commits into from Aug 15, 2017

Conversation

Projects
None yet
2 participants
@dennisoelkers
Member

dennisoelkers commented Aug 2, 2017

Description

Motivation and Context

Before this change, react was running in development mode even for
production builds, because the vendor bundle was not built with the
proper environment variable set. This change is supposed to remediate
this.

How Has This Been Tested?

The Chrome React Developer Tools show warnings if the development build is used, the build is not minified or the version is out of date. This has been used to make sure that for production there is the production build in use.

Screenshots (if appropriate):

Before:
screen shot 2017-08-02 at 13 19 03

After:
screen shot 2017-08-02 at 13 19 10

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Switching react into production mode for production builds.
Before this change, react was running in development mode even for
production builds, because the vendor bundle was not built with the
proper environment variable set. This change is supposed to remediate
this.

@bernd bernd self-assigned this Aug 14, 2017

@bernd

This comment has been minimized.

Member

bernd commented Aug 14, 2017

@dennisoelkers Do we need this for all plugins we ship as well?

@dennisoelkers

This comment has been minimized.

Member

dennisoelkers commented Aug 15, 2017

No, the react packages are part of the vendor bundle, which is built in core only.

@bernd

This comment has been minimized.

Member

bernd commented Aug 15, 2017

@dennisoelkers Got it. 👍

@bernd

bernd approved these changes Aug 15, 2017

@bernd bernd merged commit b952565 into master Aug 15, 2017

5 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 1837 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
graylog-project/pr Jenkins build graylog-project-pr-snapshot 352 has succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@bernd bernd deleted the react-production-build branch Aug 15, 2017

@bernd bernd added this to the 2.4.0 milestone Aug 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment