aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/doc/installation
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-06-06 06:57:08 +0200
committerGitHub <noreply@github.com>2023-06-06 12:57:08 +0800
commitc09f747b516f52b16f3d699e5f115789600a432a (patch)
tree8ba840d95a0f5c78446a5e3e8d92886f1245a1f1 /docs/content/doc/installation
parent8d7893e8175916ce2959882fdfb9dc4e42beb15a (diff)
downloadgitea-c09f747b516f52b16f3d699e5f115789600a432a.tar.gz
gitea-c09f747b516f52b16f3d699e5f115789600a432a.zip
Enable all webpack sourcemaps in dev build, disable all in prod build (#25089)
- 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 https://github.com/go-gitea/gitea/issues/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.
Diffstat (limited to 'docs/content/doc/installation')
-rw-r--r--docs/content/doc/installation/from-source.en-us.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/content/doc/installation/from-source.en-us.md b/docs/content/doc/installation/from-source.en-us.md
index e0be7f2f14..dfded3d9fd 100644
--- a/docs/content/doc/installation/from-source.en-us.md
+++ b/docs/content/doc/installation/from-source.en-us.md
@@ -132,6 +132,8 @@ If pre-built frontend files are present it is possible to only build the backend
TAGS="bindata" make backend
```
+Webpack source maps are by default enabled in development builds and disabled in production builds. They can be enabled by setting the `ENABLE_SOURCEMAP=true` environment variable.
+
## Test
After following the steps above, a `gitea` binary will be available in the working directory.