Releases: elixir-volt/volt
Releases · elixir-volt/volt
v0.13.1
v0.13.0
Added
env_prefixconfig for choosing which.envvariables are exposed throughimport.meta.env, including Vite-compatible prefixes like"VITE_".asset_url_prefixconfig andmix volt.build --asset-url-prefixfor changing production JavaScript and CSS asset URLs without changing Phoenix output paths.- Production chunk manifests now include richer chunk metadata:
imports,dynamicImports, chunk-localcss, and emittedassets. - Plugin
embedded_modules/3hook for exposing JavaScript-like scripts embedded in custom file formats.
Changed
- Upgraded
oxcto 0.15.1,quickbeamto 0.10.15, andreachto 2.6.1. mix volt.js.checknow supports--type-awareand--type-checkfor TypeScript-aware linting throughtsgolint.- Type-aware checks now analyze Vue and Svelte component scripts via plugin-provided virtual modules while leaving templates on the normal syntax lint path.
- Production builds now tree-shake JavaScript by default, with
tree_shaking: falseandmix volt.build --no-tree-shakingavailable to preserve unused exports. - Code-split dynamic imports now preload dependency chunks and chunk-local CSS when doing so avoids loading waterfalls.
- Code-split production builds now preserve dynamic import facades, rewrite chunk imports by exact resolved specifier, and avoid worker filename collisions.
- HMR boundary lookup now uses a served module graph, with a dedicated glob graph for
import.meta.glob()invalidation. - HMR updates now support self-accepting modules, dependency accept callbacks, multi-dependency accept callbacks, disposal data, CSS import updates, and full-reload fallback more closely to Vite's behavior.
- Production builds now write the final merged manifest once after all entries are built.
- Production JavaScript asset URL imports now emit hashed files and include them in manifest asset metadata.
- Worker build failures now fail the parent build instead of being ignored.
- JavaScript runtime installs now validate package signatures for reused install directories, and named runtimes reject option mismatches.
glob_exis now a direct dependency for HMR glob invalidation.- Volt now dogfoods type-aware JavaScript checks in
mix lint.
Breaking changes
- Custom plugins that return
{:proxy, filename, opts}fromprebundle_entry/1must useVolt.JS.PrebundleEntry.ImportandVolt.JS.PrebundleEntry.Exportentries for:importsand:exports; plain map entries are no longer accepted. - Custom
extract_imports/3plugin callbacks must return{:ok, %Volt.JS.ImportExtractor.Result{}}instead of plain maps.
v0.12.0
Added
- Vite-compatible asset query imports for
?raw,?url,?inline, and?no-inlinein development and production builds. - Production
new URL("./asset.ext", import.meta.url)asset rewriting through generated asset URL imports. - Expanded
import.meta.globsupport, dynamic import variable rewriting, and glob importer invalidation during HMR updates. - Optional Vite-style public directory support for projects that want public-root compatibility.
- Vite-style plugin
enforceordering for:pre, normal, and:posthooks.
Changed
- CSS asset URL rewriting now uses Vize/LightningCSS AST mutation and printing instead of source-range patching.
- JavaScript emitted by plugins and framework compilers now re-enters Volt's common post-processing pipeline.
- Upgraded
vizeto 0.11.1 and QuickBEAM to 0.10.14. - Documented CSS-emitting plugins and OXC-backed template generation patterns.
Fixed
- CSS-referenced assets are copied once per source asset, preserve query and fragment suffixes, and are included in build metadata.
- Asset import module identity now preserves query modes, avoiding collisions when the same file is imported with different asset queries.
- Mutating JavaScript post-processing steps now drop stale sourcemaps instead of returning mismatched maps.
- Dynamic import rewriting now preserves query suffixes.
v0.11.3
v0.11.2
v0.11.1
Added
module_typesconfig option — maps file extensions to bundler loaders (e.g.%{".css" => :empty, ".ttf" => :empty}). Passed to both production builds and vendor prebundling. Useful for packages like Monaco Editor that import non-JS files.
Changed
- Upgraded OXC to 0.13 and QuickBEAM to 0.10.13.
v0.11.0
Added
- Named configuration profiles for multi-app and umbrella support. Use
config :volt, :my_app_web, [...]to define per-app configs, and pass the profile name to Mix tasks (mix volt.build my_app_web) and the dev server plug (plug Volt.DevServer, profile: :my_app_web). The existing flatconfig :voltformat continues to work unchanged.
v0.10.9
v0.10.8
v0.10.7
Added
- Vendor prebundling and dev-server on-demand bundling now honor
resolve_dirs, allowing bare imports to resolve from additional module directories such as Phoenix's_build/$MIX_ENV/phoenix-colocatedoutput. - Documented the Phoenix LiveView colocated JavaScript setup for projects migrating from esbuild's
NODE_PATHconfiguration.
Changed
- Upgraded the Tailwind CSS runtime package requirement to
^4.3.0. mix cinow runs the test suite throughenv MIX_ENV=test, which works with newer Mix versions.
Fixed
- Additional resolve directories now support package-like folders without
package.json, including subpath imports such asphoenix-colocated/my_app.