Summary
gen-pages emits an absolute @source for each wheel-installed module's
pages/, but not for its components/. Wheel modules ship widgets under
components/ (pagebuilder's SiteHeader, MediaObject, Hero, …) whose
Tailwind classes go uncompiled unless the host hand-adds a @source line —
and the only way to point at a wheel dir by hand is a .venv-relative path,
which is not portable across OSes.
Why it bites (Windows)
A host that hand-writes the POSIX layout:
@source "../../.venv/lib/python3.12/site-packages/pagebuilder/components";
matches nothing on Windows, whose venv is .venv/Lib/site-packages/...
(capital Lib, no python3.x/). Tailwind accepts the glob silently and drops
every widget class from the build: the site-header nav is display:none
(lg:flex never emitted), the hero collapses, two-column widgets stack, and
section background colours vanish. The failure is invisible — no error, just a
broken-looking site — and only on Windows.
(Found the hard way bringing up Global Canopy Atlas on Windows.)
Root cause
render_modules_css (framework/hosting/simple_module_hosting/assets.py) emits
@source for pages_dir only:
source_lines = [
f'@source "{e.pages_dir.as_posix()}/**/*.{{ts,tsx}}";'
for e in assets
if e.pages_dir and not in_repo(e.pages_dir)
]
components/ is never discovered, so every app is left to hand-source it — and
hand-sourcing a wheel dir can't be written portably.
Fix
Have gen-pages emit an absolute @source for a wheel module's components/
too, exactly as it already does for pages/. Absolute as_posix() paths work
on POSIX and Windows alike, so no host ever hand-writes a .venv/... line
again. In-repo modules stay covered by the host's static modules/* glob.
PR attached.
Summary
gen-pagesemits an absolute@sourcefor each wheel-installed module'spages/, but not for itscomponents/. Wheel modules ship widgets undercomponents/(pagebuilder'sSiteHeader,MediaObject,Hero, …) whoseTailwind classes go uncompiled unless the host hand-adds a
@sourceline —and the only way to point at a wheel dir by hand is a
.venv-relative path,which is not portable across OSes.
Why it bites (Windows)
A host that hand-writes the POSIX layout:
matches nothing on Windows, whose venv is
.venv/Lib/site-packages/...(capital
Lib, nopython3.x/). Tailwind accepts the glob silently and dropsevery widget class from the build: the site-header nav is
display:none(
lg:flexnever emitted), the hero collapses, two-column widgets stack, andsection background colours vanish. The failure is invisible — no error, just a
broken-looking site — and only on Windows.
(Found the hard way bringing up Global Canopy Atlas on Windows.)
Root cause
render_modules_css(framework/hosting/simple_module_hosting/assets.py) emits@sourceforpages_dironly:components/is never discovered, so every app is left to hand-source it — andhand-sourcing a wheel dir can't be written portably.
Fix
Have
gen-pagesemit an absolute@sourcefor a wheel module'scomponents/too, exactly as it already does for
pages/. Absoluteas_posix()paths workon POSIX and Windows alike, so no host ever hand-writes a
.venv/...lineagain. In-repo modules stay covered by the host's static
modules/*glob.PR attached.