Frontend Build Pipeline¶
Overview¶
The widget frontend is built with Vite and TypeScript, producing a single IIFE bundle loaded by Django admin.
Build Steps¶
Vite bundles
src/frontend/index.tsintodist/components/django-hstore-widget.jsscripts/copy.tscopies the bundle tosrc/django_hstore_widget/static/admin/js/django_hstore_widget/Django serves the bundle via static files
Configuration¶
vite.config.ts- Entry point, output, aliases, dev servertsconfig.json- TypeScript compiler options, path aliases
Path Aliases¶
$lib/*
Resolves to src/frontend/lib/*
$store/*
Resolves to src/frontend/stores/*
$mappping/*
Resolves to src/frontend/mappings/*
$components/*
Resolves to src/frontend/components/*
Development¶
# Start dev server
npm run dev
# The dev server runs on port 9100 with HMR