feature:compile
Compile frontend assets (JS/CSS) for one or all features of the active product.
Usage
splent feature:compile [<feature_name>] [--watch] [--dev | --prod]
Examples
Compile all features:
splent feature:compile
Compile a specific feature:
splent feature:compile splent_feature_auth
Watch mode (recompile on change):
splent feature:compile --watch
Compile in production mode:
splent feature:compile --prod
Options
| Option | Description |
|---|---|
<feature_name> |
Optional. Compile only this feature’s assets. If omitted, compiles all features declared in pyproject.toml. |
--watch |
Enable watch mode — recompiles on file changes (development only). |
--dev |
Force development environment. |
--prod |
Force production environment (minified output, no source maps). |
Description
This command runs the feature’s asset bundler inside the active product’s container, where node_modules is properly installed.
For each feature it:
- Locates the feature’s build config file (
assets/js/webpack.config.js) at the workspace root. Pinned (versioned) features are silently skipped since their assets are pre-built. - Finds the running product container (the one with
/workspacemounted). - Executes the bundler inside that container via
docker exec.
Pinned features (those with a version suffix like @v1.2.7) are skipped with a message, since their compiled assets are already included in the release. Only editable features at the workspace root are compiled.
The production/development mode is inferred from FLASK_ENV unless overridden with --dev / --prod.
Requirements
- A product must be selected (
SPLENT_APPset). - The product container must be running (
splent product:up). node_modulesmust be installed in the product root (npm install).- Each feature must have a
webpack.config.jsunderassets/js/to be compiled (features without one are skipped with a warning).