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

Enable all webpack sourcemaps in dev build, disable all in prod build #25089

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jun 5, 2023

  • Enable all source maps in dev build
  • Disable all source maps in prod build
  • Provide ENABLE_SOURCEMAP env var to override it.

I think the strange error seen in #24784 is sourcemap related, so if we enable/disable them all, it might go away. But it's most definitely a Safari bug.

With all sourcemaps disabled, binary size goes down by around 1-2 MB, with all enabled it goes up by around 12MB. If +12MB is acceptable, we could also always enable them by default as fully source maps do have some debugging benefits.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 5, 2023
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 5, 2023
@silverwind silverwind added topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Jun 5, 2023
@silverwind silverwind changed the title Enable all webpack sourcemaps in development Enable all webpack sourcemaps in dev build, disable all in prod build Jun 5, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 6, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 6, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 6, 2023
@lunny lunny merged commit c09f747 into go-gitea:main Jun 6, 2023
@GiteaBot GiteaBot added this to the 1.20.0 milestone Jun 6, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 6, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 6, 2023
* upstream/main: (26 commits)
  Clean up WebAuthn javascript code and remove JQuery code (go-gitea#22697)
  Enable all webpack sourcemaps in dev build, disable all in prod build (go-gitea#25089)
  Don't display `select all issues` checkbox when no issues are available (go-gitea#25086)
  change placeholders in actions docs
  change placeholders in actions docs
  fix "Remove stars when repo goes private go-gitea#19904" (go-gitea#25084)
  Introduce how to configure cache when starting a Runner with Docker (go-gitea#25077)
  Remove stars when repo goes private (go-gitea#19904)
  Use correct selector for hiding RSS icon link in the branch selector dropdown (go-gitea#25080)
  Fix parallelly generating index failure with Mysql (go-gitea#24567)
  Use git command instead of the ini package to remove the `origin` remote (go-gitea#25066)
  improve permission documentation (go-gitea#23942)
  Use RepositoryList instead of []*Repository (go-gitea#25074)
  Add ability to set multiple redirect URIs in OAuth application UI (go-gitea#25072)
  Add Progressbar to Milestone Page (go-gitea#25050)
  [skip ci] Updated licenses and gitignores
  Redesign Scoped Access Tokens (go-gitea#24767)
  Use a separate admin page to show global stats, remove `actions` stat (go-gitea#25062)
  Remove cancel button from branch protection form (go-gitea#25063)
  Allow for PKCE flow without client secret + add docs (go-gitea#25033)
  ...
@silverwind silverwind deleted the srcmaps branch June 6, 2023 08:18
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants