Plugin#
Vite Plugin for Litestar.
This module provides the VitePlugin class for integrating Vite with Litestar. The plugin handles:
Static file serving configuration
Jinja2 template callable registration
Vite dev server process management
Async asset loader initialization
Development proxies for Vite HTTP and HMR WebSockets (with hop-by-hop header filtering)
Example:
from litestar import Litestar
from litestar_vite import VitePlugin, ViteConfig
app = Litestar(
plugins=[VitePlugin(config=ViteConfig(dev_mode=True))],
)
- class litestar_vite.plugin.ProxyHeadersMiddleware[source]#
Bases:
AbstractMiddlewareASGI middleware for secure proxy header handling.
Only processes X-Forwarded-* headers when the direct caller (scope[“client”]) is in the trusted hosts list. This prevents header spoofing attacks.
- Handles:
X-Forwarded-Proto: Sets scope[“scheme”] (http/https/ws/wss)
X-Forwarded-For: Sets scope[“client”] to the real client IP
X-Forwarded-Host: Optionally sets the Host header
- Security:
Never blindly trusts headers from any client. Validates caller IP against trusted hosts before reading headers. Validates scheme values to only allow http/https/ws/wss.
Example:
from litestar_vite import VitePlugin, ViteConfig from litestar_vite.config import RuntimeConfig # Trust all proxies (Railway, Heroku, container environments) app = Litestar( plugins=[VitePlugin(config=ViteConfig( runtime=RuntimeConfig(trusted_proxies="*") ))] ) # Trust specific proxy IPs app = Litestar( plugins=[VitePlugin(config=ViteConfig( runtime=RuntimeConfig(trusted_proxies=["10.0.0.0/8", "172.16.0.0/12"]) ))] )
- class litestar_vite.plugin.SSRProxyMiddleware[source]#
Bases:
AbstractMiddlewareASGI middleware that proxies HTTP traffic to an SSR framework dev server.
Used in framework mode (Astro / Nuxt / SvelteKit / Angular CLI). Any path that does not match a Litestar-registered route is proxied to the framework dev server. Litestar routes (API endpoints,
/,/favicon.icodefined by the user) are served by Litestar.Falls back to the next ASGI app when the framework dev server is unavailable, mirroring
ViteProxyMiddlewarepost-#248 behavior.HTTP only. WebSocket HMR proxying is handled by
create_ssr_ws_proxy_handler.- __init__(app: ASGIApp, target: str | None = None, hotfile_path: Path | None = None, http2: bool = True, plugin: VitePlugin | None = None) None[source]#
Initialize the middleware.
- Parameters:
app¶ – The
nextASGI app to call.exclude¶ – A pattern or list of patterns to match against a request’s path. If a match is found, the middleware will be skipped.
exclude_opt_key¶ – An identifier that is set in the route handler
optkey which allows skipping the middleware.scopes¶ – ASGI scope types, should be a set including either or both ‘ScopeType.HTTP’ and ‘ScopeType.WEBSOCKET’.
- class litestar_vite.plugin.StaticFilesConfig[source]#
Bases:
objectConfiguration for static file serving.
Field names must match keyword parameters of Litestar’s
create_static_files_router;as_router_kwargs()forwards the set fields to it.- as_router_kwargs() dict[str, Any][source]#
Return the explicitly-set fields as
create_static_files_routerkeyword arguments.optis excluded because the plugin merges it with its own options. Unset fields are omitted so Litestar’s defaults apply.- Returns:
Keyword arguments for
create_static_files_router.
- __init__(after_request: AfterRequestHookHandler | None = None, after_response: AfterResponseHookHandler | None = None, before_request: BeforeRequestHookHandler | None = None, cache_control: CacheControlHeader | None = None, exception_handlers: ExceptionHandlersMap | None = None, guards: list[Guard] | None = None, middleware: Sequence[Middleware] | None = None, opt: dict[str, Any] | None = None, security: Sequence[SecurityRequirement] | None = None, tags: Sequence[str] | None = None) None#
- class litestar_vite.plugin.StaticPlacement[source]#
-
Where static files are served from.
Subclassing
stris deliberate: consumers compare structurally against the literal value (config.placement == "native") without importing this package.- __new__(value)#
- encode(encoding='utf-8', errors='strict')#
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- replace(old, new, count=-1, /)#
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- split(sep=None, maxsplit=-1)#
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- rsplit(sep=None, maxsplit=-1)#
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- join(iterable, /)#
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- capitalize()#
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()#
Return a version of the string suitable for caseless comparisons.
- title()#
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- center(width, fillchar=' ', /)#
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int#
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- expandtabs(tabsize=8)#
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int#
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- partition(sep, /)#
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- index(sub[, start[, end]]) int#
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- ljust(width, fillchar=' ', /)#
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()#
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)#
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- rfind(sub[, start[, end]]) int#
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int#
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)#
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rstrip(chars=None, /)#
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- rpartition(sep, /)#
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- splitlines(keepends=False)#
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- strip(chars=None, /)#
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()#
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- translate(table, /)#
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()#
Return a copy of the string converted to uppercase.
- startswith(prefix[, start[, end]]) bool#
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- endswith(suffix[, start[, end]]) bool#
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- removeprefix(prefix, /)#
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)#
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- isascii()#
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- islower()#
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isupper()#
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- istitle()#
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isspace()#
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- isdecimal()#
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()#
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isnumeric()#
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isalpha()#
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isalnum()#
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isidentifier()#
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- isprintable()#
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
- zfill(width, /)#
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- format(*args, **kwargs) str#
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str#
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- static maketrans()#
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- __dir__()#
Returns public methods and other interesting attributes.
- __init__(*args, **kwds)#
- class litestar_vite.plugin.StaticServerConfig[source]#
Bases:
objectDescribe where static files should be served from.
reasonis diagnostic detail that is meaningful only whenplacementisASGI; it explains why Litestar’s static router must serve (development mode, framework/SSR routing, manifest/build-state problems, and similar).- __post_init__() None[source]#
Enforce the placement invariants.
- Raises:
ValueError – If
NATIVEhas no mounts,NATIVEcarries a reason, orASGIlacks a non-empty reason.
- __init__(placement: StaticPlacement = StaticPlacement.ASGI, mounts: tuple[StaticServerMount, ...] = (), reason: str | None = None) None#
- class litestar_vite.plugin.StaticServerMount[source]#
Bases:
objectDescribe one static directory exposed to a native server.
- class litestar_vite.plugin.TrustedHosts[source]#
Bases:
objectContainer for trusted proxy hosts and networks.
Provides efficient lookup for IP addresses and CIDR networks. Following Uvicorn’s security model for proxy header validation.
- Supports:
Wildcard “*” to trust all hosts (for controlled environments)
IPv4 addresses: “192.168.1.1”
IPv6 addresses: “::1”
CIDR notation: “10.0.0.0/8”, “fd00::/8”
Literals for non-IP hosts (e.g., Unix socket paths)
- __init__(trusted_hosts: list[str] | str) None[source]#
Initialize trusted hosts container.
- Parameters:
trusted_hosts¶ – A single host, comma-separated string, or list of hosts. Use “*” to trust all hosts (only in controlled environments).
- __contains__(host: str | None) bool[source]#
Check if a host is trusted.
- Parameters:
host¶ – The host to check. Can be an IP address or literal.
- Returns:
True if the host is trusted, False otherwise.
- get_trusted_client_host(x_forwarded_for: str) str[source]#
Extract the real client IP from X-Forwarded-For header.
The X-Forwarded-For header contains a comma-separated list of IPs. Each proxy appends the client IP to the list. We find the first untrusted host (reading from right to left) which is the real client.
- Parameters:
x_forwarded_for¶ – The X-Forwarded-For header value.
- Returns:
The first untrusted host in the chain, or the original client if all hosts are trusted.
- class litestar_vite.plugin.VitePlugin[source]#
Bases:
InitPlugin,CLIPluginVite plugin for Litestar.
This plugin integrates Vite with Litestar, providing:
Static file serving configuration
Jinja2 template callables for asset tags
Vite dev server process management
Async asset loader initialization
Example:
from litestar import Litestar from litestar_vite import VitePlugin, ViteConfig app = Litestar( plugins=[ VitePlugin(config=ViteConfig(dev_mode=True)) ], )
- __init__(config: ViteConfig | None = None, asset_loader: ViteAssetLoader | None = None, static_files_config: StaticFilesConfig | None = None) None[source]#
Initialize the Vite plugin.
- property config: ViteConfig#
Get the Vite configuration.
- Returns:
The ViteConfig instance.
- property asset_loader: ViteAssetLoader#
Get the asset loader instance.
Lazily initializes the loader if not already set.
- Returns:
The ViteAssetLoader instance.
- property spa_handler: AppHandler | None#
Return the configured SPA handler when SPA mode is enabled.
- Returns:
The AppHandler instance, or None when SPA mode is disabled/not configured.
- property proxy_client: AsyncClient | None#
Return the shared httpx.AsyncClient for proxy requests.
The client is initialized during app lifespan (dev mode only) and provides connection pooling, TLS session reuse, and HTTP/2 multiplexing benefits.
- Returns:
The shared AsyncClient instance, or None if not initialized or not in dev mode.
- get_static_server_config() StaticServerConfig[source]#
Describe where the production static bundle should be served from.
- Returns:
A
StaticServerConfigwhoseplacementisNATIVEwith one mount when the production bundle is eligible for direct web-server serving, orASGIwith a diagnosticreasonwhen Litestar’s static router must serve.
- on_cli_init(cli: Group) None[source]#
Register CLI commands.
- Parameters:
cli¶ – The Click command group to add commands to.
- on_app_init(app_config: AppConfig) AppConfig[source]#
Configure the Litestar application for Vite.
This method wires up supporting configuration for dev/prod operation:
Adds types used by generated handlers to the signature namespace.
Ensures a consistent NotFound handler for asset/proxy lookups.
Registers optional Inertia and Jinja integrations.
Configures static file routing when enabled.
Configures dev proxy middleware based on proxy_mode.
Creates/initializes the SPA handler where applicable and registers lifespans.
- Parameters:
app_config¶ – The Litestar application configuration.
- Returns:
The modified application configuration.
- get_route_prefixes(app: Litestar) tuple[str, ...][source]#
Return the immutable route-prefix cache owned by this plugin.
- server_lifespan(app: Litestar) Generator[None, None, None][source]#
Server-level lifespan context manager (runs ONCE per server, before workers).
This is called by Litestar CLI before workers start. It handles: - Environment variable setup (with logging) - Vite dev server process start/stop (ONE instance for all workers) - Type export on startup
Note: SPA handler and asset loader initialization happens in the per-worker lifespan method, which is auto-registered in on_app_init.
Hotfile behavior: the JS plugin’s listening callback writes the authoritative target once the Vite socket is ready. Python pre-writes only user-asserted external targets whose dev servers do not run the JS plugin.
- Parameters:
app¶ – The Litestar application instance.
- Yields:
None
- lifespan(app: Litestar) AsyncGenerator[None, None][source]#
Worker-level lifespan context manager (runs per worker process).
This is auto-registered in on_app_init and handles per-worker initialization: - Environment variable setup (silently - each worker needs process-local env vars) - Shared proxy client initialization (dev mode only, for ViteProxyMiddleware/SSRProxyController) - Asset loader initialization - SPA handler initialization - Route metadata injection
Note: The Vite dev server process is started in server_lifespan, which runs ONCE per server before workers start.
- Parameters:
app¶ – The Litestar application instance.
- Yields:
None
- class litestar_vite.plugin.ViteProcess[source]#
Bases:
objectManages the Vite development server process.
This class handles starting and stopping the Vite dev server process, with proper thread safety and graceful shutdown. The active ASGI server owns top-level signals; one atexit hook remains as a last-resort cleanup path.
- __init__(executor: JSExecutor) None[source]#
Initialize the Vite process manager.
- Parameters:
executor¶ – The JavaScript executor to use for running Vite.
- start(command: list[str], cwd: TypeAliasForwardRef('pathlib.Path') | str | None) None[source]#
Start the Vite process.
- Parameters:
If the process exits immediately, this method captures stdout/stderr and raises a ViteProcessError with diagnostic details.
- Raises:
ViteProcessError – If the process fails to start.
- stop(timeout: float = 5.0) None[source]#
Stop the Vite process and all its child processes.
Uses process groups to ensure child processes (node, astro, nuxt, vite, etc.) are terminated along with the parent npm/npx process.
- Parameters:
timeout¶ – Seconds to wait for graceful shutdown before killing.
- Raises:
ViteProcessError – If the process fails to stop.
- class litestar_vite.plugin.ViteProxyMiddleware[source]#
Bases:
AbstractMiddlewareASGI middleware to proxy Vite dev HTTP traffic to internal Vite server.
HTTP requests use httpx.AsyncClient with optional HTTP/2 support for better connection multiplexing. WebSocket traffic (used by Vite HMR) is handled by a dedicated WebSocket route handler created by create_vite_hmr_handler().
The middleware reads the Vite server URL from the hotfile dynamically, ensuring it always connects to the correct Vite server even if the port changes.
- __init__(app: ASGIApp, hotfile_path: Path, asset_url: str | None = None, resource_dir: Path | None = None, bundle_dir: Path | None = None, root_dir: Path | None = None, http2: bool = True, plugin: VitePlugin | None = None) None[source]#
Initialize the middleware.
- Parameters:
app¶ – The
nextASGI app to call.exclude¶ – A pattern or list of patterns to match against a request’s path. If a match is found, the middleware will be skipped.
exclude_opt_key¶ – An identifier that is set in the route handler
optkey which allows skipping the middleware.scopes¶ – ASGI scope types, should be a set including either or both ‘ScopeType.HTTP’ and ‘ScopeType.WEBSOCKET’.
- litestar_vite.plugin.create_disabled_vite_hmr_handlers(hmr_path: str = '/static/vite-hmr') list[Any][source]#
Create route handlers for stale Vite HMR clients.
Production mode does not register the real HMR proxy, but browser tabs that loaded the dev client before a restart can keep reconnecting to the old HMR endpoint. Registering this explicit websocket route prevents those requests from matching the HTTP-only static files route and surfacing as a Litestar routing
KeyError. A matching HTTP 404 route preserves the previous production response for accidental HTTP requests to the same path.- Parameters:
hmr_path¶ – The path to register the stale HMR WebSocket handler at.
- Returns:
Route handlers for HTTP and WebSocket traffic on the HMR path.
- litestar_vite.plugin.create_ssr_http_proxy_handler(target: str | None = None, hotfile_path: Path | None = None, http2: bool = True, plugin: VitePlugin | None = None, paths: list[str] | None = None) Any[source]#
Create an HTTP catch-all route handler that proxies to an SSR framework dev server.
Used in framework mode (Astro / Nuxt / SvelteKit / Angular CLI). The handler claims
/and/{path:path}for all HTTP methods so any path the user has not registered falls through to the framework’s dev server. Litestar’s routing dispatches the matched route directly, avoiding the 405 Method Not Allowed class that would result from a WebSocket-only/registration.The
pathsargument is the collision-avoidance lever: pass["/{path:path}"]when the user has registered a handler at/so Litestar does not raiseHandler already registered for path '/'at app construction.- Parameters:
target¶ – Static target URL (for external dev servers with a known URL).
hotfile_path¶ – Path to the hotfile for dynamic target discovery.
http2¶ – Enable HTTP/2 for proxy connections.
plugin¶ – Optional VitePlugin reference for accessing the shared proxy client.
paths¶ – Override the default HTTP paths; defaults to
["/", "/{path:path}"].
- Returns:
A Litestar HTTP route handler decorated with
@route.
- litestar_vite.plugin.create_ssr_ws_proxy_handler(target: str | None = None, hotfile_path: TypeAliasForwardRef('pathlib.Path') | None = None, paths: list[str] | None = None) Any[source]#
Create a WebSocket route handler that proxies HMR traffic to an SSR framework dev server.
Used in framework mode for hot-module-reload WebSocket connections.
pathsdefaults to["/", "/{path:path}"]to catch every HMR endpoint the framework might use; the HTTP catch-all fromcreate_ssr_http_proxy_handler()ensures HTTP requests at the same paths are dispatched to a real handler instead of returning 405.
- litestar_vite.plugin.create_vite_hmr_handler(hotfile_path: Path, hmr_path: str = '/static/vite-hmr', asset_url: str = '/static/') Any[source]#
Create a WebSocket route handler for Vite HMR proxy.
This handler proxies WebSocket connections from the browser to the Vite dev server for Hot Module Replacement (HMR) functionality.
- litestar_vite.plugin.get_litestar_route_prefixes(app: Litestar) tuple[str, ...][source]#
Return route prefixes, using VitePlugin-owned caching when available.
- Parameters:
app¶ – The Litestar application instance.
- Returns:
A tuple of route prefix strings (without trailing slashes).
- litestar_vite.plugin.is_litestar_route(path: str, app: Litestar) bool[source]#
Check if a path matches a registered Litestar route.
This function determines if a request path should be handled by Litestar rather than proxied to the Vite dev server or served as SPA content.
A path matches if it equals a registered prefix or starts with prefix + “/”.
- litestar_vite.plugin.resolve_litestar_version() str[source]#
Return the installed Litestar version string.
- Returns:
The installed Litestar version, or “unknown” when unavailable.
- litestar_vite.plugin.set_app_environment(app: Litestar) None[source]#
Set environment variables derived from the Litestar app instance.
This is called after set_environment() once the app is available, to export app-specific configuration like OpenAPI paths.
- Parameters:
app¶ – The Litestar application instance.
- litestar_vite.plugin.set_environment(config: ViteConfig, asset_url_override: str | None = None, app: Litestar | None = None) None[source]#
Configure environment variables for Vite integration.
Sets environment variables that can be used by both the Python backend and the Vite frontend during development.