Commit 89b3660
AJ Griffiths
fix Tailwind 4 production build OOM by scoping source detection
Tailwind 4's automatic source detection scans from the current working
directory. The Docker frontend stage has no WORKDIR, so cwd is `/` and
Tailwind tries to ingest the entire container filesystem. That work
happens in oxide/lightningcss native (off-heap) code, so the build ran
~11 minutes and was then OOM-killed -- and raising --max-old-space-size
never helped, because that only bounds the V8 heap, not native memory.
Disable auto-detection with `source(none)` and declare the sources
explicitly instead (mirroring the previous tailwind.config.js `content`
globs, including .py for classes used in Wagtail blocks/widgets). The
theme is loaded explicitly via @config.
Frontend docker build (npm run build:prod): 651s + OOM -> ~3s.1 parent 7512040 commit 89b3660
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
| |||
0 commit comments