You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable production source maps for index.js, fix CSS sourcemaps (#27291) (#27295)
Backport #27291 by @silverwind
Previously, the production build never output sourcemaps. Now we emit
one file for `index.js` because it is the most likely one where we need
to be able to better debug reported issues like
#27213. This will currently
increase the binary size of gitea by around 700kB which is what the
gzipped source map file has.
Also, I fixed the CSS sourcemap generation which was broken since the
introduction of lightningcss.
The chinese docs are machine-translated, please correct accordingly.
Co-authored-by: silverwind <[email protected]>
Copy file name to clipboardExpand all lines: docs/content/installation/from-source.en-us.md
+8-2
Original file line number
Diff line number
Diff line change
@@ -128,8 +128,6 @@ If pre-built frontend files are present it is possible to only build the backend
128
128
TAGS="bindata" make backend
129
129
```
130
130
131
-
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.
132
-
133
131
## Test
134
132
135
133
After following the steps above, a `gitea` binary will be available in the working directory.
@@ -260,3 +258,11 @@ GOARCH=amd64 \
260
258
TAGS="bindata sqlite sqlite_unlock_notify" \
261
259
make build
262
260
```
261
+
262
+
## Source Maps
263
+
264
+
By default, gitea generates reduced source maps for frontend files to conserve space. This can be controlled with the `ENABLE_SOURCEMAP` environment variable:
265
+
266
+
-`ENABLE_SOURCEMAP=true` generates all source maps, the default for development builds
267
+
-`ENABLE_SOURCEMAP=reduced` generates limited source maps, the default for production builds
268
+
-`ENABLE_SOURCEMAP=false` generates no source maps
0 commit comments