farm-fe/farm
36.3
Weak · 30 September 2026
131.8k
lines of production code
Rust
with TypeScript, JavaScript
2
measurements over time
What this system is
Farm is a high-performance, Rust-based web build tool and bundler designed for modern frontend development. It provides a comprehensive compilation pipeline that handles JavaScript, TypeScript, CSS, and HTML, featuring incremental builds, persistent caching, and a robust Hot Module Replacement system. The system supports a wide array of frameworks including React, Vue, Svelte, and Solid, while also offering native capabilities for library packaging, server-side rendering, and desktop application development via Electron and Tauri.
How it got here
2022–2023 — Rust core and plugin ecosystem
130 changes.
The project established the foundational Rust-based compiler architecture, including the core module system, plugin driver, and Node.js bindings. This period focused on rewriting key build plugins for CSS, HTML, and script processing in Rust while introducing persistent caching and incremental build capabilities. It also expanded the ecosystem by migrating JavaScript plugins and adding comprehensive test coverage for the new infrastructure.
2024 — v2.0 ecosystem expansion and scaffolding
66 changes.
This period focused on expanding the Farm v2.0 ecosystem by introducing comprehensive project scaffolding tools and a wide array of framework-specific examples, including support for React, Vue, Svelte, Solid, and desktop targets like Electron and Tauri. The work also involved enhancing core compiler capabilities, such as improved tree-shaking precision, modular minification, and new Vite adapter integrations, alongside the release of Rust plugin tooling and utility packages.
2025–2026 — Farm v2.0 feature expansion and Rust migration
30 changes.
This period focused on advancing Farm v2.0 through extensive new features, including comprehensive plugin ecosystems, library mode enhancements, and improved module handling. Significant effort was directed at migrating core functionality and plugins to Rust to improve performance and native integration. The work also established robust testing infrastructure, documentation, and AI agent capabilities to support the evolving build tool.
Features
Add Arco Design Pro example project
Introduces a new Arco Design Pro example application, including its Farm build configuration, source code, and end-to-end tests to demonstrate the framework's capabilities with a React-based admin dashboard.
examples/arco-pro · high confidence
Add CSS Modules example with SCSS and PostCSS support
A new example project has been added to demonstrate CSS Modules integration within the Farm build tool. The example showcases a React application that utilizes SCSS modules for scoped styling, including features like global class injection and variable imports. It is configured to process styles through PostCSS using the \postcss-pxtorem\ plugin for responsive unit conversion, and includes a complete build setup with sourcemap generation and HMR support via the Farm configuration.
examples/css-modules · high confidence
Add Electron example with TypeScript and IPC support
The examples/electron directory now includes a complete starter project for building desktop applications using Farm, Electron, and TypeScript. This example demonstrates how to configure the build for both the renderer and main processes using the @farmfe/js-plugin-electron plugin, sets up secure inter-process communication via contextBridge, and includes configuration for packaging with Electron Forge.
examples/electron · high confidence
Add Farm + React + TypeScript example with Panda CSS
Added a new example project in the \examples/pandacss\ directory demonstrating how to integrate Panda CSS with the Farm build tool, React, and TypeScript. The entry includes configuration files for Farm (\farm.config.ts\), Panda (\panda.config.ts\), and PostCSS, along with source files showing a basic React component using Panda's \css\ helper for styling.
examples/pandacss · high confidence
Add Farm + React example targeting browser-esnext
A new example project has been added to demonstrate integrating React with the Farm bundler. The example configures the build target to 'browser-esnext' and includes a basic React application with a counter component, supporting hot module replacement (HMR) for development.
examples/target-env · high confidence
Add Farm + React example with TypeScript and HMR tests
This location introduces a new example project demonstrating how to use Farm with React and TypeScript. It includes the necessary configuration files (farm.config.ts, tsconfig.json) and source components (Main, ClassC, FnC) to render a React application. Additionally, it provides an end-to-end test suite (e2e.spec.mjs) that verifies Hot Module Replacement (HMR) functionality for both function and class components, as well as error recovery during file edits.
examples/react-fast-refresh · high confidence
Add Farm + Svelte + TypeScript example template
A new example project has been added to demonstrate how to use the Farm bundler with Svelte and TypeScript. This template includes a \farm.config.ts\ file that configures the \@sveltejs/vite-plugin-svelte\ adapter, along with standard Svelte project files (App.svelte, Counter.svelte, main.ts) and configuration files (tsconfig.json, svelte.config.js) to provide a working starting point for developers.
examples/vite-adapter-svelte · high confidence
Add Farm + Svelte example with Vanilla Extract integration
This change introduces a new example project demonstrating how to use Farm with Svelte and the Vanilla Extract CSS-in-JS library. It includes the necessary configuration files (farm.config.ts, tsconfig.json), source code for a counter component and styled elements using Vanilla Extract, and end-to-end tests to verify the build and preview commands function correctly.
examples/vanilla-extract · high confidence
Add Farm build adapter example for Vue and Tailwind CSS
The \examples/vite-adapter-vue-css\ directory now contains a complete example demonstrating how to build a Vue application using the Farm bundler. This includes a \farm.config.ts\ that configures the build to use Vite plugins (\@vitejs/plugin-vue\, \@vitejs/plugin-vue-jsx\, and \@tailwindcss/vite\), enabling Vue Single-File Components and Tailwind CSS within the Farm ecosystem. The example also provides the necessary source files (\index.html\, \src/\), a Tailwind configuration, and an end-to-end test (\e2e.spec.mjs\) to verify the build output.
examples/vite-adapter-vue-css · high confidence
Add Farm v2.0 React example with vite-plugin-pages integration
A new example project has been added to demonstrate using the Farm v2.0 bundler with React. The setup configures the Farm build tool to work alongside Vite plugins, specifically integrating vite-plugin-pages for file-based routing in a React application. The example includes a complete starter structure with React Router, hot module replacement support, and a basic multi-page layout.
examples/vite-adapter-react · high confidence
Add JSON file loading and transformation plugin
Introduces a new plugin that enables the build system to load and transform .json files. When a JSON file is loaded, it is read as UTF-8 text and marked with a custom 'json' module type. During the transform phase, the plugin parses the JSON content and converts it into JavaScript: it generates a CommonJS \module.exports\ statement if the output format is CJS or the target environment is not a library, otherwise it generates an ES module \export default\ statement.
_crates/plugin\json/src · high confidence
Add NestJS example with Farm build plugin
Added a new example in the \examples/nestjs\ directory demonstrating how to build a NestJS application using the Farm bundler. This includes a custom \NestPlugin\ (\index.plugin.ts\) that configures Farm for Node.js ESM output and legacy decorator support, along with standard NestJS project files (controllers, services, modules) and configuration for TypeScript, ESLint, and Prettier.
examples/nestjs · high confidence
Add Node.js server example with Farm build configuration
Added a new example demonstrating a Node.js server setup using the Farm build tool. This includes a Farm configuration that compiles TypeScript to CommonJS for the Node environment, an Express server entry point, and supporting project files like ESLint and TypeScript configurations.
examples/node-server · high confidence
Add PostCSS example with postcss-import support
The \examples/postcss\ directory now includes a complete example demonstrating how to use the Farm build tool with PostCSS. This example configures the \@farmfe/js-plugin-postcss\ plugin with \postcss-import\ enabled, integrates Tailwind CSS with nesting support, and uses \postcss-pxtorem\ for responsive font sizing. It serves as a reference for setting up PostCSS pipelines within Farm projects.
examples/postcss · high confidence
Add PostCSS processing plugin
Introduces a new PostCSS plugin that processes CSS files by loading configuration via postcss-load-config. The plugin supports an optional internal postcss-import feature to handle @import statements, including resolving paths and rebasing URLs, and automatically watches CSS dependencies in development mode to ensure hot updates work correctly when imported files change.
js-plugins/postcss · high confidence
Add Preact + TypeScript project template
Users can now scaffold a new Farm application using the Preact framework with TypeScript support. This change introduces a complete starter template including configuration for the Preact Vite plugin, TypeScript compiler settings compatible with Preact's JSX runtime, and standard project files (HTML, CSS, and entry points) to facilitate immediate development.
crates/create-farm-rs/templates/preact · high confidence
Add Preact example template for Farm
Introduces a new example project in the \examples/preact\ directory that demonstrates how to use Preact with the Farm build tool. The template includes a Vite-based configuration (\farm.config.ts\) utilizing the \@preact/preset-vite\ plugin alongside the standard React plugin, TypeScript setup with Preact compatibility mappings, and a sample application (\src/app.tsx\) that integrates PatternFly UI components.
examples/preact · high confidence
Add React + Farm example with SCSS support
A new example project has been added to demonstrate integrating React with the Farm build tool, specifically highlighting support for SCSS styling. The example includes a \farm.config.ts\ configuration that utilizes the \@farmfe/js-plugin-sass\ plugin to process Sass files, alongside standard React components and CSS modules. This provides a reference implementation for users looking to set up a React application with Farm and SCSS capabilities.
examples/react-sass-js · high confidence
Add React Antd and Vue NativeUI examples
New example projects have been added to demonstrate the build tool with React (using Ant Design) and Vue (using NativeUI). The React example includes a full layout with routing, CSS/Sass support, and configuration for a specific public path, while the Vue example demonstrates Vite plugin integration and custom output filename patterns.
examples/react-antd · high confidence
Add React Query example with Farm and Vite plugin pages
This change introduces a new example application in the \examples/react-query\ directory that demonstrates integrating React Query with the Farm build tool. The example is configured to use \vite-plugin-pages\ for file-based routing, includes a basic React setup with \react-router-dom\, and provides source files for a home page and an about page to showcase the lazy compilation path fix.
examples/react-query · high confidence
Add Rust Sass plugin example with HMR support
Added a new example demonstrating the integration of the Rust-based Sass plugin with Farm. The example includes a React application configured to use the plugin, featuring SCSS imports, variable usage, and background image handling. It also includes end-to-end tests verifying that Sass compilation works correctly and that Hot Module Replacement (HMR) updates styles in real-time when source files change.
examples/sass-plugin-rust · high confidence
Add Rust plugin to replace Node.js \_\_dirname, \_\_filename, and import.meta.url
A new Rust-based plugin (FarmPluginReplaceDirname) has been added to the build toolchain to polyfill Node.js-specific path variables for JavaScript modules. The plugin intercepts module processing to replace occurrences of \_\dirname with the actual directory path, \\_filename with the file path, and import.meta.url with a file:// URL, ensuring compatibility for code relying on these globals during bundling.
rust-plugins/replace-dirname · high confidence
Add SASS and static-assets examples for Farm
Added two new example projects, \examples/sass\ and \examples/static-assets\, to demonstrate SASS integration with the Farm build tool. The SASS example showcases the \@farmfe/js-plugin-sass\ with React, including configuration for alias resolution, additional data injection, and handling of SCSS imports. The static-assets example demonstrates the legacy SASS plugin mode for processing stylesheets and embedding static assets like fonts and images.
examples/sass · high confidence
Add Sass compilation plugin
Introduces a new JavaScript plugin for the Farm build system that enables compilation of SCSS and Sass files into CSS. The plugin integrates with the build pipeline via load and transform hooks, automatically registers .scss and .sass extensions, and supports configuration options such as legacy API usage, custom implementations (e.g., sass-embedded), global data injection, and source map generation.
js-plugins/sass · high confidence
Add Solid SSR example with server-side rendering and hydration
A new Solid SSR example has been added to the examples directory, demonstrating how to set up server-side rendering with Solid and Solid Router. The example includes configuration for both client and server builds using Farm, an Express-based server to handle SSR requests, and client-side hydration logic. Users can now reference this example to understand how to implement SSR with Solid in a Farm project.
examples/solid-ssr · high confidence
Add Solid.js example with Vite plugin adapter
Added a new example project in examples/vite-adapter-solid that demonstrates integrating Solid.js with the Farm build tool using the Vite plugin adapter. The example includes a configured farm.config.ts that applies the vite-plugin-solid to JSX/TSX files, a basic Solid application with routing via @solidjs/router, and standard project scaffolding (HTML, CSS modules, TypeScript config).
examples/vite-adapter-solid · high confidence
Add Tailwind CSS example for Farm v2
The examples/tailwind directory now provides a complete starter project demonstrating how to integrate Tailwind CSS with Farm v2. This includes a React application configured with PostCSS (using the farmPostcssPlugin), a Tailwind configuration file, and necessary build tooling (eslint, tsconfig, gitignore) to support utility-first styling in a Farm development environment.
examples/tailwind · high confidence
Add TailwindCSS Rust Plugin example for Farm
The examples/tailwindcss-rust-plugin directory now provides a complete demonstration of integrating the Rust-based TailwindCSS plugin with the Farm build tool. This example includes a React application configured via farm.config.ts to use the plugin, showcasing features such as custom theme colors, responsive utilities, hover variants, and the @apply directive. It also includes end-to-end tests to verify that the plugin correctly processes styles and updates them during hot module replacement (HMR).
examples/react-ssr, examples/tailwindcss-rust-plugin · high confidence
Add Tauri 2 templates for Farm
New project templates are available for Tauri 2, supporting Preact, React, Solid, SvelteKit, and vanilla TypeScript frontends. These templates use the Tauri 2 configuration schema, the \@tauri-apps/api/core\ module for invoking Rust commands, and the Farm bundler for the frontend build process.
crates/create-farm-rs/templates/tauri2 · high confidence
Add Tauri starter templates for Preact, React, Solid, Svelte, Vue, and Vanilla TypeScript
The \create-farm\ tool now includes new project templates for Tauri applications using Preact, React, Solid, Svelte, Vue, and Vanilla TypeScript. These templates provide a complete starting point, including the Rust backend (\src-tauri\), frontend configuration (\farm.config.ts\), and necessary IDE setup files (\.vscode/extensions.json\). Each template is configured to use the Farm build tool, runs on port 1420, and includes a basic 'greet' command to demonstrate Tauri-Rust communication.
crates/create-farm-rs/templates/tauri · high confidence
Add Vue + Ant Design Vue example application
A new example project demonstrating a Vue application integrated with Ant Design Vue (antdv) has been added to the examples directory. This sample includes a complete build configuration using the Farm bundler with Vite plugins, TypeScript support, and LESS styling. It showcases key features such as Vue Router with nested routes, dynamic component imports, and the usage of Ant Design Vue components like DatePickers, Modals, and Drawers.
examples/vue-antdv · high confidence
Add Vue 2 project template for Farm
A new project template for Vue 2 has been added to the create-farm tool. This template provides a ready-to-run Vue 2 application configured with Farm, including a Vite Vue 2 plugin integration, standard project structure (App.vue, HelloWorld component), and build scripts for development, production, and preview modes.
crates/create-farm-rs/templates/vue2 · high confidence
Add Vue 3 + TypeScript template for Farm
Introduces a new project template for creating Vue 3 applications with TypeScript using the Farm build tool. The template includes a pre-configured \farm.config.ts\ that bridges Vite's Vue plugin, a standard Vue 3 component structure with a counter example, and TypeScript configuration files (\tsconfig.json\, \tsconfig.node.json\) that extend \@vue/tsconfig\ to ensure strict type checking and proper module resolution.
crates/create-farm-rs/templates/vue3 · high confidence
Add Vue JSX example project
A new example project has been added to demonstrate Vue with JSX support using the Farm build tool. The example includes a configuration file (\farm.config.mjs\) that integrates Vite's Vue and Vue JSX plugins, along with source files (\src/index.tsx\, \src/button.vue\, etc.) showcasing dynamic component rendering and state management within a Vue JSX context.
examples/vue-jsx · high confidence
Add Vue SSR example with client/server configuration
The examples/vue-ssr directory now includes a complete Vue Server-Side Rendering example. This adds client and server build configurations (farm.config.ts and farm.config.server.ts), a Node.js server entry point (server.js) for production rendering, and Vue application source files (including routing via vue-router and PrimeVue components). The example demonstrates how to configure Farm for both browser and Node.js targets, with specific instructions to disable lazyCompilation for the server-side entry.
examples/vue-ssr · high confidence
Add Vue example with JSX and HMR support
The examples/vue directory now includes a complete Vue application demonstrating integration with the Farm build tool. The example utilizes the native Rust @farmfe/plugin-vue and @farmfe/plugin-vue-jsx to support both .vue Single File Components and JSX syntax. It features a multi-view setup with vue-router, state management via Pinia, and scoped CSS/SCSS styling. Additionally, an end-to-end test suite (e2e.spec.mjs) has been added to verify core functionality, including component rendering, router navigation, and Hot Module Replacement (HMR) for both template and style updates.
examples/vue · high confidence
Add Vue example with Vite plugin adapter and Element Plus integration
Added a new \examples/vite-adapter-vue\ example demonstrating how to use Farm with Vue 3 by leveraging the Vite plugin adapter. The example configures \@vitejs/plugin-vue\ and \@vitejs/plugin-vue-jsx\ via the \vitePlugins\ field in \farm.config.ts\, alongside standard Farm plugins for Sass, Less, and PostCSS. It showcases integration with Element Plus for UI components, \unplugin-vue-router\ for file-based routing, and \unplugin-auto-import\ for automatic imports. The example also includes configuration for UnoCSS, SVG component generation, and demonstrates handling of scoped module styles and various asset types.
examples/vite-adapter-vue · high confidence
Add browser library example with Farm build configuration
A new example project for building a browser-targeted library has been added to the examples directory. It includes a Farm build configuration that outputs ES modules for the browser, a TypeScript setup with React JSX support, an ESLint configuration, and a sample React button component to demonstrate the library structure.
examples/lib-for-browser · high confidence
Add css-url example demonstrating CSS alias resolution
Added a new example project that demonstrates resolving CSS file paths using aliases (such as \/@\ and \@\) configured in the build settings, ensuring that background image URLs in stylesheets correctly resolve to their source locations.
examples/css-url · high confidence
Add emotion example demonstrating SWC plugin integration
This change introduces a new example application in the \examples/emotion\ directory that demonstrates how to integrate the \@swc/plugin-emotion\, \@swc/plugin-styled-components\, and \@swc/plugin-styled-jsx\ plugins with the Farm build tool. The example includes a Farm configuration (\farm.config.ts\) that sets up these plugins to handle CSS-in-JS styling for Emotion, styled-components, and styled-jsx respectively, along with corresponding React components (\emotion.tsx\, \styled-components.tsx\, \styled-jsx.tsx\) and an end-to-end test (\e2e.spec.mjs\) to verify the correct rendering and styling of these components.
examples/emotion · high confidence
Add environment variable configuration example
The examples/env directory now includes a complete demonstration of environment variable handling, featuring .env files for development, production, and staging environments that define variables with custom prefixes (FARM\_, CUSTOM\PREFIX\, NEW\_), variable expansion, and escaping. The example uses a Farm configuration to specify which environment variable prefixes are exposed to the application, and includes an HTML page that displays the resolved values of these variables in the browser, along with end-to-end tests to verify the setup.
examples/env · high confidence
Add example demonstrating import.meta.url support
The examples/import-meta directory now includes a configuration and source file that demonstrates how to use the import.meta.url meta-property within a Node.js target environment, specifically showing how to resolve a relative file path using the new URL constructor.
examples/import-meta · high confidence
Add lazy compilation example for Farm v2
The examples/lazy-compilation directory now includes a complete working example demonstrating dynamic imports and lazy loading within the Farm v2 build system. The example features a configuration file (farm.config.ts) that disables persistent caching and progress output, an HTML entry point, and source files (index.ts, comp1.ts, comp2.ts, comp3.ts, data.ts) that illustrate how to asynchronously import components and render them into the DOM without full page reloads.
examples/lazy-compilation · high confidence
Add multi-page React application example
Introduces a new example demonstrating a multi-page application setup using Farm, React, and SCSS. The example configures distinct entry points for an index and an about page, utilizing a shared HTML base template and enabling HMR and CORS in the development server. It also includes end-to-end tests to verify that URL parameters and hash fragments are correctly handled during navigation between pages.
examples/multi-page-app · high confidence
Add progress plugin for build feedback
A new \FarmPluginProgress\ has been added to the build system to provide real-time visual feedback during compilation. This plugin hooks into various stages of the build process—such as module transformation, caching, graph optimization, and resource rendering—to update a terminal progress bar, helping users track the status and duration of their builds.
_crates/plugin\progress/src · high confidence
Add public-dir example demonstrating custom public directory configuration
This change introduces a new example project in the \examples/public-dir\ directory that demonstrates how to configure a custom public directory using the \publicDir\ option in \farm.config.ts\. The example sets the public directory to \newPublic\ and includes a test JavaScript file within that directory, which is referenced in \index.html\ to verify that static assets are correctly served from the custom path.
examples/public-dir · high confidence
Add public-path example with custom asset serving configuration
Introduces a new example project demonstrating how to configure a custom \publicPath\ (\/public-path/\) for serving static assets. The example includes a React application setup with Farm, featuring environment variable handling via \.env\ files, SASS compilation support, and an end-to-end test suite to verify correct asset loading during both development and preview modes.
examples/public-path · high confidence
Add server-proxy example with E2E tests
Added a new example demonstrating server-side proxy configuration, including a Farm config that proxies \/api\ requests to a local Express server, an HTML entry point that fetches from that proxy, and an end-to-end test suite verifying both start and preview commands.
examples/server-proxy · high confidence
Add tree-shaking example for Ant Design with Farm
Added a new example project demonstrating how to tree-shake Ant Design components using the Farm bundler. The example includes configuration files for Farm (including a specific build config for the button component), source code importing the Ant Design Button, and an end-to-end test to verify the button click behavior.
examples/tree-shake-antd · high confidence
Add vanilla TypeScript template for Farm
The \create-farm\ CLI now includes a new vanilla TypeScript template. This adds a complete starter project structure including \index.html\, TypeScript source files (\main.ts\, \counter.ts\), styling, and configuration files (\farm.config.ts\, \tsconfig.json\). Users can now scaffold a new Farm application using vanilla TypeScript with a pre-configured development environment.
crates/create-farm-rs/templates/vanilla · high confidence
Add x-data-spreadsheet example using Farm build tool
A new example demonstrating the x-data-spreadsheet library has been added to the repository. This example is built using the Farm toolchain (configured via farm.config.ts) and includes a basic spreadsheet instance that logs data changes and generates a ZIP file using JSZip. The setup includes standard project scaffolding such as ESLint configuration, a .gitignore file, and an HTML entry point.
examples/x-data-spreadsheet · high confidence
Added HMR example demonstrating various hot module replacement strategies
The \examples/hmr\ directory now includes a complete example application showcasing different Hot Module Replacement (HMR) capabilities. The example demonstrates self-acceptance with empty callbacks, self-acceptance with module replacement functions, accepting specific dependencies via string or array paths, invalidating parent modules, handling module disposal to clean up DOM elements, and pruning unused styles. This serves as a reference for implementing robust HMR in applications.
examples/hmr · high confidence
Added Lit and Svelte project templates
New starter templates for Lit and Svelte are now available when creating a new Farm project. The Lit template provides a TypeScript-based setup with a custom element example, while the Svelte template includes a counter component and configuration for the Svelte Vite plugin, giving users ready-to-run scaffolding for both frameworks.
crates/create-farm-rs/templates/lit, crates/create-farm-rs/templates/svelte · high confidence
Added NestJS template with Farm build support
Introduced a new project template for NestJS applications, including the core source files (controllers, services, modules) and configuration for the Farm build tool. The template features a custom \NestPlugin\ for \@farmfe/core\ that configures TypeScript compilation with legacy decorator support and ESM output targeting Node.js, alongside standard NestJS tooling like ESLint, Prettier, and Jest for testing.
crates/create-farm-rs/templates/nestjs · high confidence
Added QR code generation example
The examples/qrcode directory now includes a functional demo that generates a QR code canvas from text using the 'qrcode' library. Users can view this example to see how to integrate QR code generation into a web application via a simple HTML entry point and JavaScript logic.
examples/qrcode · high confidence
Added TypeScript declaration file generation plugin
Introduced the \FarmPluginDts\ Rust plugin, which automatically generates \.d.ts\ declaration files for TypeScript and TSX source modules during compilation. The plugin filters input files based on configurable include/exclude patterns (defaulting to \.ts\/\.tsx\ files while excluding \node\_modules\), processes the AST to remove non-type imports, and emits the resulting declaration files. It also includes logic to rewrite import paths using the project's resolve configuration.
rust-plugins/dts · high confidence
Added compiler usage examples for module graphs, React, and HMR updates
New example programs have been added to demonstrate how to use the Farm compiler API. These include \module\_graph.rs\ and \script\_entry.rs\ for basic compilation setups, \react.rs\ for React-specific builds, and \react\_update.rs\ which specifically demonstrates the hot module replacement (HMR) workflow by invoking the \compiler.update\ method after an initial compile.
crates/compiler/examples · high confidence
Added example for Vite tsconfig-paths integration with Farm
A new example project at examples/vite-adapter-tsconfig-paths demonstrates how to use the vite-tsconfig-paths plugin within a Farm build configuration. The example includes a Farm configuration file (farm.config.ts) that applies the plugin, along with TypeScript configuration (tsconfig.json) and source files (src/index.ts, src/dep.ts) that utilize path aliases (e.g., @/dep.js) to verify the integration works correctly.
examples/vite-adapter-tsconfig-paths · high confidence
Added lib-watch and resolve-module-graph examples
New example projects have been added to demonstrate library watch mode and module graph resolution. The lib-watch example configures Farm for Node.js output with lazy compilation and HMR disabled, showcasing dynamic imports. The resolve-module-graph example demonstrates partial bundling enforcement and externalization of Node.js built-in modules.
examples/lib-watch · high confidence
Added runtime-plugin example for Farm v2
The examples/runtime-plugin directory now contains a complete example demonstrating Farm v2's runtime plugin capabilities. It includes a Farm configuration (farm.config.ts) that loads a custom runtime plugin to intercept and replace dynamic module imports at runtime, along with source files, a test script to verify the replacement behavior, and standard project configuration files (tsconfig, eslint, gitignore).
examples/runtime-plugin · high confidence
Initial implementation of the SVGR Rust core transformation engine
This change introduces the foundational Rust implementation for the SVGR SVG-to-React component transformer. It adds the core configuration structures, state management, and error handling, alongside the complete AST transformation pipeline: converting XML/SVG into SWC AST nodes, mapping HTML/SVG attributes to their React JSX equivalents, and applying specific transformations such as adding/removing JSX attributes, handling dynamic title/desc elements, managing dimensions, and supporting React Native SVG output. This establishes the core library that powers the transformation logic.
rust-ecosystem/svgr-rs · high confidence
Initial release of the core Rust crate with plugin compatibility versioning
The \crates/core/src\ module is introduced as the foundational library for the build system, establishing the core data structures and public API. It defines a specific \VERSION\ constant (0.5.1) to ensure binary compatibility between dynamic library plugins and the core, allowing the plugin loader to recognize compatible extensions. The crate re-exports essential dependencies such as SWC components, serialization libraries (rkyv, serde), and concurrency primitives, while providing utility macros for profiling and serialization to support the broader compilation flow.
crates/core/src · high confidence
Introduce \#\[cache\_item\] procedural macro for automatic serialization
A new \\#\[cache\_item\]\ attribute macro is added to the \macro\_cache\_item\ crate, allowing users to annotate structs or enums to automatically generate \rkyv\-based serialization and deserialization logic. When applied, the macro creates an archived version of the type and implements the \Cacheable\ trait, enabling efficient binary serialization for caching purposes. The macro supports specifying a custom crate name for the trait implementation via an optional attribute argument.
_crates/macro\_cache\item/src · high confidence
Introduce @farmfe/cli as the unified command-line interface for Farm v2
The \packages/cli\ directory now contains the source code for the \@farmfe/cli\ package, establishing the official CLI entry point for Farm. This release introduces the \farm\ command with support for \dev\, \build\, \watch\, \preview\, and \clean\ operations. Users can now configure the development server and build process via command-line flags, including options for lazy compilation, HMR, CORS, strict port handling, output directory, input files, source maps, minification, tree-shaking, and target environment (node/browser/library). The CLI also supports specifying a custom config file, environment mode, and public base path, while automatically resolving the project root and delegating execution to the \@farmfe/core\ engine.
packages/cli · high confidence
Introduce @farmfe/js-plugin-electron for Electron app builds
Added the new \@farmfe/js-plugin-electron\ plugin, which enables building Electron main and preload processes using Farm. The plugin configures separate build targets for the main and preload scripts, automatically setting the output format (CJS or ESM) and file extensions based on the project's package type, while ensuring the \electron\ package is treated as external and handling hot-reload or restart behaviors during development.
js-plugins/electron · high confidence
Introduce @farmfe/utils package with color formatting and process spawning utilities
The new @farmfe/utils package provides terminal color formatting helpers (including bold, dim, italic, underline, inverse, hidden, strikethrough, and various foreground/background colors) and a utility for spawning child processes. The color module supports ANSI escape codes, respects NO\_COLOR/FORCE\_COLOR environment variables and CLI flags, and includes a gradientString function for multi-color text output. A createSpawnCmd helper wraps Node's child\_process.spawn with configurable working directory and stdio options. Tests verify the createFormatter function handles nested close tags correctly and that color functions apply the expected ANSI codes.
packages/utils · high confidence
Introduce Farm DTS plugin for TypeScript declaration generation
The \js-plugins/dts\ directory now contains a new plugin (\farm-plugin-dts\) that generates \.d.ts\ declaration files for TypeScript projects. The plugin hooks into the build lifecycle via \configResolved\, \load\, \transform\, \finish\, and \updateFinished\ to process \.ts\ and \.tsx\ files. It utilizes \ts-morph\ to parse source files, resolve dependencies, and emit declarations to a configurable output directory. Users can configure the plugin through \DtsPluginOptions\, including settings for \tsConfigPath\, \outputDir\, \include\/\exclude\ globs, \aliasesExclude\, and diagnostic handling (\skipDiagnostics\, \noEmitOnError\).
js-plugins/dts · high confidence
Introduce Farm Plugin Tools for building and publishing Rust plugins
The \@farmfe/plugin-tools\ package is now available to help developers build and publish Farm plugins written in Rust. It provides a CLI (\farm-plugin-tools\) with a \build\ command that wraps \@napi-rs/cli\, automatically stripping legacy \--cargo-name\ flags and allowing custom build profiles without the default \--release\ flag. A \prepublish\ command handles publishing platform-specific native packages with public access and updates the main package's \optionalDependencies\. The tools also include a \create-farm-plugin\ template to scaffold new Rust plugins.
packages/plugin-tools · high confidence
Introduce Farm v2.0 HMR runtime plugin
The \@farmfe/runtime-plugin-hmr\ package is introduced as a new runtime plugin for Farm v2.0, providing Hot Module Replacement capabilities compatible with the Vite HMR API. The plugin establishes a WebSocket connection to the development server to receive update payloads and applies changes to modules via the \ModuleSystem\. It supports standard HMR features such as \hot.accept\, \hot.dispose\, and \hot.prune\, and includes an error overlay for displaying compilation errors in the browser. The implementation also handles specific edge cases, such as preventing full page reloads when a boundary module is not found in multi-page applications and fixing syntax error panics on Windows.
packages/runtime-plugin-hmr · high confidence
Introduce FarmPluginDefine for source code variable replacement
Added the \FarmPluginDefine\ plugin, which enables the replacement of defined variables in source code during the build process. The plugin supports both standard string replacement and regex-based pattern matching (using the \$\_\_farm\_regex:\ prefix) for configuration keys. It automatically sorts definitions by key length to ensure longer keys are replaced first and delays the processing of the \FARM\_PROCESS\_ENV\ variable to ensure it is handled last, allowing for consistent environment variable substitution.
_crates/plugin\define/src · high confidence
Introduce JavaScript-based LESS plugin for Farm v2
The LESS plugin is now implemented in JavaScript (TypeScript source) within the js-plugins/less directory, replacing previous implementations. This new plugin integrates with the Farm v2 compilation context to handle LESS file loading and transformation, supporting features like additional data injection, custom Less options, and Vite-compatible URL rebasing for imports. It automatically registers the .less extension and hooks into the compiler's watch system for development mode.
js-plugins/less · high confidence
Introduce Rust-based runtime plugin for module system and entry handling
The build system now uses a new Rust plugin (\FarmPluginRuntime\) to manage the execution environment. This plugin handles entry resource generation, including the injection of global require logic for Node.js ESM targets and the assembly of runtime code. It also manages the runtime module system by inserting imports for dynamic features like dynamic imports and plugins, and transforms \import.meta\ references to use the internal module system. Additionally, it implements Hot Module Replacement (HMR) detection by parsing \module.meta.hot.accept\ calls to identify self-accepted modules and their dependencies.
_crates/plugin\runtime/src · high confidence
Introduce Rust-based script compilation plugin
The build system now uses a new Rust plugin (FarmPluginScript) to handle JavaScript and TypeScript compilation, replacing previous implementations. This plugin manages the full script processing pipeline, including dependency analysis (supporting ESM imports, CommonJS requires, and dynamic imports), AST parsing, TypeScript stripping, and decorator transformation (supporting both 2021-12 and 2022-03 proposals). It also integrates with SWC for plugin-based transformations and supports import.meta.url and import.meta.glob features.
_crates/plugin\script/src · high confidence
Introduce SVGR plugin for converting SVGs to JSX components
Users can now import SVG files directly as React components. This new plugin automatically transforms SVG assets into JSX code during the build process, allowing them to be used as standard components in their applications. The plugin supports configuration via \svgrOptions\ and respects query parameters like \?raw\, \?url\, or \?inline\ to bypass transformation when needed.
js-plugins/svgr · high confidence
Introduce Tailwind CSS integration plugin
Adds a new Farm plugin that integrates Tailwind CSS by scanning source files for utility class candidates and generating optimized CSS output during the build process. This enables users to use Tailwind CSS classes in their projects with automatic scanning and CSS generation capabilities.
js-plugins/tailwindcss · high confidence
Introduce compiler module graph tracing capability
The compiler now exposes a \traceModuleGraph\ feature that allows users to inspect the resolved module graph, including module metadata (ID, content hash, package name/version) and dependency edges. This is implemented via a new \trace\_module\_graph\ module and a corresponding \trace\_module\_graph\ method on the \Compiler\ struct, which builds the project and serializes the internal module and watch graphs into a structured format. Additionally, utility functions are added to extract module IDs from various compilation errors (resolve, load, transform, parse), supporting better error reporting and debugging.
crates/compiler/src · high confidence
Introduce core compilation toolkit for CSS, HTML, and runtime features
The \crates/toolkit/src\ module now provides the foundational utilities for the build system, including CSS parsing and code generation with sourcemap support, HTML document parsing and minification, and a runtime feature guard remover that strips conditional code based on target environment and plugin configuration. It also introduces resource management functions to identify and inject dynamic and initial assets, filename transformation logic with hash placeholders, and sourcemap tracing to link bundled output back to original source files.
crates/toolkit/src · high confidence
Introduce dedicated minification plugin for JS and CSS assets
Users now have a dedicated \FarmPluginMinify\ component that automatically minifies JavaScript and CSS resource pots during compilation when the \minify.enabled\ config option is turned on. The plugin delegates JS minification to the toolkit's \minify\_js\_resource\_pot\ function (respecting \MinifyOptions\) and applies CSS minification via \swc\_css\_minifier\, while explicitly skipping HTML minification (which is handled by the HTML plugin) and library-specific JS minification (handled by the library plugin).
_crates/plugin\minify/src · high confidence
Introduce new Rust-based tree-shaking plugin
The build system now includes a new \FarmPluginTreeShake\ component in Rust that replaces or augments previous tree-shaking logic. This plugin initializes a module map, marks entry points and initial side effects, traverses the module graph to identify used exports (handling both ESM and CommonJS), removes unused statements and modules, and strips \import.meta.hot\ update statements in production mode to reduce bundle size.
_crates/plugin\_tree\shake/src · high confidence
Introduce persistent and incremental build caching
The build system now supports persistent caching to speed up subsequent builds. This change introduces a new \CacheManager\ that manages module, resource, and plugin caches, supporting both in-memory and disk-backed storage strategies. Users benefit from faster rebuilds as the compiler can now read and write cached compilation artifacts to disk, with the cache directory and namespace configurable via the \CacheType\ enum.
crates/core/src/cache · high confidence
Introduce runtime plugin for import.meta.env and import.meta.url polyfills
The new @farmfe/runtime-plugin-import-meta package provides runtime support for standard JavaScript meta properties in Farm applications. It polyfills import.meta.env by exposing environment variables (such as dev, prod, BASE\_URL, and SSR) derived from the build context and process environment, and it correctly resolves import.meta.url for modules. This allows applications to rely on standard web platform APIs for environment detection and module identification at runtime.
packages/runtime-plugin-import-meta · high confidence
Introduce script metadata plugin with async module detection and export expansion
The new \FarmPluginScriptMeta\ crate adds a plugin that populates script module metadata, including detecting async modules (via top-level await) and updating them during graph changes, expanding export identifiers for tree-shaking and minification, and analyzing module features like dynamic imports and import/export specifiers.
_crates/plugin\_script\meta · high confidence
Introduce static asset handling plugin
Adds a new \FarmPluginStaticAssets\ plugin that enables the bundler to resolve, load, and transform static assets (such as images, fonts, and media files) from the public directory. This plugin supports inlining assets as base64 data URIs via the \?inline\ query, exposing raw file content via \?raw\, and generating optimized asset URLs with content hashes for production builds, ensuring correct public path prefixes are applied.
_crates/plugin\_static\assets/src · high confidence
Introduces Resource Pot metadata and type system for JS, CSS, and HTML
The build system now tracks structured metadata for bundled resources (Resource Pots) via new \CssResourcePotMetaData\, \HtmlResourcePotMetaData\, and \JsResourcePotMetaData\ structs, enabling the compiler to preserve ASTs, comments, and custom data for each resource type. A unified \ResourceType\ enum and \ResourcePot\ model define how these bundles are identified, typed, and serialized, laying the groundwork for partial bundling and incremental builds.
crates/core/src/resource · high confidence
Introduces Rust plugin system type definitions and SWC integration helpers
The new \toolkit\_plugin\_types\ crate provides the foundational types and utilities for the Rust-based plugin architecture. It exposes modules for SWC AST handling and transforms, allowing Rust plugins to interact with the build system's JavaScript/TypeScript processing pipeline. Specifically, it defines structs like \ParseScriptModuleResult\ and \FarmSwcTransformReactOptions\ to standardize data exchange, and provides functions (\farm\_swc\_parse\_module\, \farm\_create\_swc\_source\_map\, \farm\_swc\_try\_with\, \swc\_transform\_react\) that dynamically load and execute SWC-related symbols from plugin libraries via \libloading\. This enables plugins to parse modules, create source maps, and apply React-specific SWC transforms within the Farm build tool.
_crates/toolkit\_plugin\types/src · high confidence
Introduces Rust-based CLI utilities for the create-farm tool
The \create-farm-rs\ crate now includes a new \utils\ module containing Rust implementations for terminal styling, interactive prompts, and template parsing. This adds a \colors.rs\ module for ANSI color and formatting control, a \theme.rs\ module defining a \ColorfulTheme\ for the \dialoguer\ library, and a \prompts.rs\ module providing select, input, and confirm prompt wrappers. Additionally, an \lte.rs\ module implements a custom lexer and parser for a simple template language using \{% %}\ syntax, enabling dynamic content generation during project scaffolding.
crates/create-farm-rs/src/utils · high confidence
Introduces Rust-based module resolution plugin
Adds a new \FarmPluginResolve\ implementation in Rust to handle module resolution, replacing or augmenting previous logic. This plugin manages import resolution by checking external configurations, applying deduplication rules, handling browser-specific field mappings, and supporting dynamic extensions. It also includes logic to automatically treat failed resolutions as external when configured, improving compatibility with native ESM and TypeScript files by stripping \.js\ extensions during lookup.
_crates/plugin\resolve/src · high confidence
Introduces \`\#\[farm\_plugin\]\` macro for dynamic plugin creation
The \crates/macro\_plugin\ crate now provides the \\#\[farm\_plugin\]\ procedural macro attribute. When applied to a struct, it automatically generates the necessary entry-point functions (\\_plugin\_create\ and \\_core\_version\) and applies \\#\[unsafe(no\_mangle)\]\ to them. This allows users to define custom plugins in Rust that can be dynamically loaded by the Farm build system without manually implementing the plugin factory boilerplate.
_crates/macro\plugin · high confidence
Introduces lazy compilation plugin for dynamic imports
Adds a new Rust plugin (\FarmPluginLazyCompilation\) and its associated runtime module (\dynamic\_module.ts\) that intercepts dynamic imports to defer compilation until the module is actually needed. The plugin resolves dynamic imports to virtual modules which, when loaded, trigger a compilation request to the build server, inject the resulting resources (scripts/links) into the page, and register the newly compiled module in the runtime system. This enables on-demand code splitting and reduced initial bundle size for applications using dynamic imports.
_crates/plugin\_lazy\compilation/src · high confidence
Introduction of FarmPluginPolyfill for ES syntax transformation
A new \FarmPluginPolyfill\ component has been added to handle ES syntax transformation and polyfill injection. This plugin processes JavaScript modules by applying \preset-env\ transformations based on configuration, while specifically handling runtime modules by downgrading them to ES5 in production mode without injecting polyfills. It also ensures compatibility by converting module ASTs to scripts when necessary to prevent incorrect \core-js\ import statements and automatically manages aliases for \@swc/helpers\.
_crates/plugin\polyfill/src · high confidence
Introduction of centralized logging and compilation context infrastructure
The build system now includes a dedicated \LogStore\ component within the core compilation context to centrally collect and manage warnings and errors during the build process. This change introduces the foundational \CompilationContext\ structure in \crates/core/src/context\, which orchestrates the module graph, resource maps, caching, and plugin drivers, providing a unified state container for the compilation pipeline.
crates/core/src/context · high confidence
Introduction of core module system and HMR statistics tracking
The build system now includes a foundational module architecture in \crates/core/src/module\, defining the \Module\ struct, \ModuleType\ enum (supporting Js, Ts, Css, Html, and custom types), and graph structures (\ModuleGraph\, \ModuleGroupGraph\, \WatchGraph\) to manage dependencies and file watching. Additionally, \crates/core/src/stats\ introduces a \Stats\ component that records timing and hook performance for both initial compilations and Hot Module Replacement (HMR) updates, providing visibility into the build process.
crates/core/src/module · high confidence
Introduction of the Rust plugin system and driver
The core compilation engine now supports a plugin architecture via the \Plugin\ trait and \PluginDriver\. This change introduces a structured hook system (including \resolve\, \load\, \transform\, \parse\, \process\_module\, \analyze\_deps\, \finalize\_module\, \freeze\_module\, \module\_graph\_build\_end\, \build\_end\, \generate\_start\, \optimize\_module\_graph\, \freeze\_module\_graph\_meta\, \analyze\_module\_graph\, \partial\_bundling\, and \process\_resource\_pots\) that allows extensions to intercept and modify the build process. The \PluginDriver\ manages plugin execution order based on priority, supports serial, parallel, and 'first-wins' hook invocation patterns, and includes a recording mode for performance profiling.
crates/core/src/plugin · high confidence
Library mode now supports UMD output and CSS-to-script transformation
The Farm build tool's library mode now supports generating UMD (Universal Module Definition) bundles, allowing libraries to be consumed in environments that support AMD, CommonJS, or global script tags. Additionally, CSS assets can now be transformed into JavaScript modules, enabling CSS-in-JS patterns or dynamic style injection within library builds. These changes enhance the flexibility of library outputs for broader browser compatibility and modern styling approaches.
_crates/plugin\library · high confidence
Migrate JavaScript plugins to the unified repository
The JavaScript plugins (including Babel, Copy, DTS, Electron, Less, PostCSS, Qiankun, React Compiler, Sass, and SVGR) have been migrated from their previous locations into this repository. This change introduces the official build configurations, TypeScript settings, and documentation for these plugins, aligning them with the Farm v2.0 architecture and enabling unified versioning and maintenance.
js-plugins · high confidence
New AI agent skills and configuration for Docusaurus and browser automation
Added new skill definitions and documentation for the Docusaurus documentation site generator and the agent-browser CLI tool, enabling AI agents to configure projects, manage sidebars, handle authentication, and automate browser interactions. Introduced a local settings file that grants the agent permissions to execute Bash commands and fetch data from GitHub, and added a memory rule enforcing that git pre-commit hooks are never skipped.
.claude · high confidence
New Electron templates for Preact, React, Solid, Svelte, and Vanilla
The \create-farm\ scaffolding tool now includes ready-to-use Electron templates for Preact, React, Solid, Svelte, and Vanilla TypeScript projects. These templates provide a complete starting point, including the \electron/main.ts\ and \electron/preload.ts\ entry points, a \forge.config.cjs\ for packaging, and \farm.config.ts\ files configured with the \@farmfe/js-plugin-electron\ to integrate the build pipeline. They also include shared configuration files like \.npmrc\ (with hoisting and mirror settings) and \gitignore\ to streamline development.
crates/create-farm-rs/templates/electron · high confidence
New Farm + Solid TypeScript template
A new project template for building applications with SolidJS and TypeScript on the Farm build tool is now available. This template includes a pre-configured \farm.config.ts\ that integrates \vite-plugin-solid\ for JSX transformation, along with standard entry points (\index.html\, \src/index.tsx\, \src/App.tsx\), TypeScript configuration (\tsconfig.json\), ESLint setup, and CSS styling. Users can scaffold a new project using this template to immediately start developing with SolidJS features like signals and HMR.
crates/create-farm-rs/templates/solid · high confidence
New Farm + Vue SFC example with deferred import support
Added a new example project in examples/vite-adapter-vue-sfc-src that demonstrates running a Vue Single File Component application via Farm's Vite adapter. The example includes a full Vue app setup (App.vue, HelloWorld.vue, DeferImport.vue) and a Farm configuration (farm.config.ts) that enables the 'deferredImportEvaluation' Babel plugin to support deferred imports, alongside a custom plugin to handle style resolution. It also provides an end-to-end test suite (e2e.spec.mjs) to verify HMR updates for both templates and styles, as well as persistent cache behavior.
examples/vite-adapter-vue-sfc-src · high confidence
New JavaScript plugins for Babel, React Compiler, and Vuetify integration
This release introduces three new JavaScript plugins to the build system. The Babel plugin (\js-plugin:babel\) allows users to configure Babel transformations via a standard plugin interface with customizable filters and priorities. The React Compiler plugin (\js-plugin:react-compiler\) integrates Facebook's React Compiler by wrapping the Babel plugin with \babel-plugin-react-compiler\ and \@babel/plugin-syntax-jsx\, automatically handling JSX/TSX files. The Vuetify plugin (\js-plugin:vuetify\) provides support for Vuetify components in Vue Single File Components (SFCs), including automatic import generation and style resolution, while detecting and integrating with existing Vue plugins like \@farmfe/plugin-vue\ or \unplugin-vue\.
js-plugins/babel, js-plugins/react-compiler, js-plugins/vuetify · high confidence
New React + Farm + Less example project
Added a new example project demonstrating how to use the Farm build tool with React and Less. The example includes a \farm.config.ts\ configuration that integrates the \@farmfe/js-plugin-less\ plugin, featuring support for \additionalData\ to inject variables (such as \@hoverColor\) into specific Less files, and demonstrates various Less import styles including relative paths, alias-based imports (\@/\), and tilde-prefixed imports (\\~@/\). The project also showcases HMR setup, TypeScript integration, and a sample UI with styled components.
examples/less · high confidence
New React example with comprehensive build configuration
The \examples/react\ directory now includes a complete starter project demonstrating Farm's capabilities with React. This includes a \farm.config.js\ that enables persistent caching, source maps, and Hot Module Replacement (HMR) via the \@farmfe/plugin-react\ and \@farmfe/plugin-sass\. The example showcases support for SCSS modules, environment variable handling (including \VITE\_\ prefixed variables), and static asset imports using \import.meta.glob\. It also integrates Redux Toolkit for state management and demonstrates TypeScript configuration via a dedicated \tsconfig.json\.
examples/react · high confidence
New Rust implementation of the Tailwind CSS Node compilation layer
The \tailwindcss-node\ crate now provides a Rust port of the \@tailwindcss/node\ TypeScript package, introducing a native compilation orchestration layer. This implementation handles CSS and JavaScript module resolution (supporting both ESM and CJS), transitive dependency tracing for JS/TS files, and CSS optimization via the \lightningcss\ crate (including nesting expansion, media-query transpilation, and minification). It also includes utilities for cross-platform path normalization, source-map generation, and performance instrumentation, ensuring that relative \url()\ references are correctly rebased during the build process.
rust-ecosystem · high confidence
New Rust-based CSS plugin with dependency analysis and HMR support
The CSS processing pipeline has been rewritten in Rust, introducing a new \FarmPluginCss\ and \FarmPluginCssResolve\ that handle CSS loading, resolution (including \@import\ and \url()\ dependencies), and module transformation. This change adds a dedicated \DepAnalyzer\ to correctly track CSS dependencies for Hot Module Replacement (HMR) and partial bundling, while \SourceReplacer\ manages URL rebasing and \@import\ removal during the build. The new implementation supports CSS modules, sourcemaps, and transforms CSS into JavaScript modules for better integration with the bundler's module graph.
_crates/plugin\css/src · high confidence
New Rust-based Node.js binding for the Farm compiler
This change introduces the \crates/node\ crate, which exposes the Farm compiler to Node.js via the \napi-rs\ bindings. It provides a \JsCompiler\ constructor that accepts JavaScript and Rust plugins, and exposes compiler methods like \trace\_dependencies\ and \trace\_module\_graph\ to JavaScript. The crate also implements a comprehensive \JsPluginAdapter\ system, mapping JavaScript plugin hooks (such as \resolve\, \load\, \transform\, \processModule\, and \processRenderedResourcePot\) to the Rust compiler's plugin driver. Additionally, it includes a \JsFileWatcher\ for file system events and context methods to support Vite plugin compatibility (e.g., \viteGetImporters\, \viteGetModuleById\).
crates/node · high confidence
New Rust-based auto-import and icon plugins
The build system now includes two new Rust plugins: \farmfe\_plugin\_auto\_import\ and \farmfe\_plugin\_icons\. The auto-import plugin automatically injects imports for framework-specific APIs (Vue, React, Pinia, Vue Router, React Router) and local directory exports into JavaScript and TypeScript files, while also generating corresponding \.d.ts\ type declarations. The icons plugin resolves virtual icon paths, fetching SVG data from Iconify or local sources with disk caching, and compiles the SVGs into components for Vue, React, Svelte, Solid, and Preact.
(repo-wide) · high confidence
New Rust-based build plugins for compression, code stripping, virtual modules, and web workers
The build system now includes several new Rust plugins that replace or supplement previous JavaScript implementations. The compression plugin adds support for Brotli, Gzip, and Deflate algorithms with configurable filtering and parallel processing. The strip plugin enables removal of debugger statements, labeled blocks, and specific functions from JavaScript/TypeScript code. The virtual module plugin provides a mechanism for resolving and loading virtual modules with custom content and module types. The worker plugin implements support for Web Workers and Shared Workers, including inline worker bundling with base64 encoding and URL-based worker resolution.
(repo-wide) · high confidence
New Rust-based plugin examples for auto-import, compression, icons, and images
Added example projects demonstrating the integration of Rust plugins into Farm, including auto-import support for React and Vue, Brotli compression, icon handling (with UnoCSS integration for React), and image processing. These examples provide templates for setting up these specific capabilities in new or existing Farm applications.
(repo-wide) · high confidence
New Tailwind CSS and React animation example
Added a new example application in the \examples/tailwind-next\ directory that demonstrates integrating Tailwind CSS with a React frontend using the Farm build tool. The example includes a \farm.config.ts\ setup with the \@farmfe/js-plugin-tailwindcss\ plugin, a \tailwind.config.js\ extending theme variables and animations, and a React application (\src/App.tsx\) showcasing various CSS animations like pulse, bounce, spin, and custom keyframes.
examples/tailwind-next · high confidence
New Vue 2 example using Farm build tool
Added a new example application in the examples/vite-adapter-vue2 directory that demonstrates integrating Vue 2 with the Farm build tool. The example includes a Farm configuration file (farm.config.ts) that sets up Vite plugin compatibility, path aliases, and a development server proxy, along with the necessary source files (App.vue, main.js) and assets to run a TDesign-based Vue 2 application.
examples/vite-adapter-vue2 · high confidence
New \`testing\` proc-macro for automatic test generation
The \macro\_testing\ crate now provides a \\#\[testing\]\ procedural macro that automatically generates Rust test functions based on file patterns. By specifying a glob pattern and a handler function, the macro scans the filesystem for matching files and creates individual test cases for each, passing the file path and base directory to the handler. This simplifies the process of writing tests for multiple input files or fixtures without manually boilerplate-ing each test case.
_crates/macro\testing · high confidence
New agent skills for Docusaurus and browser automation
Added new agent skills for Docusaurus and browser automation. The Docusaurus skill provides capabilities for project configuration, sidebar management, versioning, internationalization, custom plugins, and theme customization. The browser automation skill enables AI agents to interact with websites through commands for navigation, element interaction, screenshots, and data extraction, with support for authentication patterns, session management, proxy configuration, and video recording.
.agents · high confidence
New build, release, and E2E test automation scripts
The repository now includes a comprehensive suite of new scripts to manage the build lifecycle and testing. The \scripts/build.mjs\ and \scripts/bootstrap.mjs\ files orchestrate the compilation of the core, CLI, runtime, and both JavaScript and Rust plugins, while \scripts/release.mjs\ and \scripts/release-nightly.mjs\ handle publishing packages via changesets. A new parallel E2E testing infrastructure is introduced with \scripts/test-e2e.mjs\ (orchestrator) and \scripts/test-e2e-worker.mjs\ (worker), which distribute example tests across multiple browser instances. Additional utility scripts like \scripts/ready.mjs\ for pre-flight checks, \scripts/ci-build-rust-artifacts.sh\ for CI-specific Rust builds, and \scripts/bump.mjs\ for versioning streamline the developer workflow.
scripts · high confidence
New decorators example demonstrating legacy decorator support
Added a new example project in \examples/decorators\ that demonstrates how to use legacy TypeScript decorators with the Farm build tool. The example includes a \farm.config.ts\ configuration enabling \script.decorators\ with the \2021-12\ version and \legacyDecorator\ mode, along with source code (\src/broken.ts\) showing a decorator-based validation pattern and a test script to verify the build output.
examples/decorators · high confidence
New example demonstrating Node.js module resolution with partial bundling
Added a new example in the \examples/resolve-node-modules\ directory that demonstrates how to configure Farm for Node.js environments. The example includes a \farm.config.ts\ file setting the target environment to \node\, externalizing built-in modules, and enabling the \partialBundling\ feature to enforce a single output bundle (\node.bundle.js\). It also provides a minimal \index.ts\ entry point importing \ts-morph\ to illustrate module resolution in this context.
examples/resolve-node-modules · high confidence
New example demonstrating lazy compilation for Node.js targets
Added a new example project (\examples/node-lazy-compile\) that demonstrates how to use lazy compilation when targeting the Node.js environment. The example includes a Farm configuration (\farm.config.ts\) setting \targetEnv\ to \node\ and enabling \lazyCompilation\, along with source files that dynamically import modules and an end-to-end test suite to verify the behavior during watch and preview modes.
examples/node-lazy-compile · high confidence
New example for building Node.js libraries with Farm
Added a new example demonstrating how to configure Farm to build libraries targeting the Node.js environment. The example includes a \farm.config.ts\ file that sets the output target environment to 'node' and an \index.js\ entry point that imports and uses \@clack/prompts\ for CLI interaction.
examples/build-lib-external · high confidence
New example for generating TypeScript declaration files
Added the \examples/generate-dts\ example, which demonstrates how to use the \@farmfe/js-plugin-dts\ plugin to generate \.d.ts\ files. The example includes a Farm configuration (\farm.config.mjs\) that sets up the DTS plugin with a custom output directory, configures Node.js-specific compilation settings (such as externalizing built-in modules and targeting the Node environment), and utilizes partial bundling. It also provides sample TypeScript source files (\src/index.ts\, \src/types/index.ts\, \type.ts\, \types.ts\) containing type definitions and utility functions to illustrate the plugin's behavior.
examples/generate-dts · high confidence
New examples and plugin utilities for Farm v2.0
This update introduces several new example applications demonstrating Farm's capabilities with React, Vue 3, and module concatenation, alongside new utility functions in the core toolkit. The \crates/toolkit\ now includes \plugin\_utils\ for handling file extensions, normalizing paths across operating systems, and filtering paths via regex. New examples include a \refactor-react\ template with multi-page support and partial bundling, a \module-concatenation\ demo, a \visualizer\ example with custom server middleware, and a \vue3\ template utilizing Vite plugins and auto-imports.
(repo-wide) · high confidence
New external dependency example added
Added a new example project in the \examples/external\ directory that demonstrates how to configure and use external dependencies (such as jQuery, React, and React DOM) within the Farm build tool. The example includes a configuration file (\farm.config.ts\) that maps these libraries to global variables, along with the necessary source code, HTML entry point, and end-to-end tests to verify correct behavior.
examples/external · high confidence
New module for resolving package.json and handling path aliases
The \crates/toolkit/src/resolve\ module has been added to provide shared utilities for plugin resolution. It introduces a \PackageJsonLoader\ that caches and loads \package.json\ metadata from the current directory up through ancestors, with options to follow symlinks and control ancestor traversal. It also includes a \SymlinksAnalyzer\ to resolve real paths from symlinked directories and a \path\_start\_with\_alias\ utility that matches paths against string or regex-based alias configurations, supporting exact matches (trailing \$\) and regex prefixes. These components are exposed as global statics (\PACKAGE\_JSON\_LOADER\, \SYMLINKS\_ANALYZER\) and helper functions (\load\_package\_json\, \follow\_symlinks\, \default\_package\_json\) for use by other toolkit plugins.
crates/toolkit/src/resolve · high confidence
New persistent caching and incremental build infrastructure
The build system now supports persistent caching and incremental builds to significantly speed up subsequent compilations. This change introduces a new module caching layer that stores and retrieves module states based on content hashes and file timestamps, allowing unchanged modules to be skipped during rebuilds. It also adds a 'freeze' step for the module graph to persist resolved dependencies and updates the build lifecycle to integrate these cache checks into the module resolution and graph finalization phases.
crates/compiler/src/build · high confidence
New plugin hook parameter structures for module lifecycle and HMR
The plugin system now exposes detailed parameter structs for key lifecycle hooks, including \analyze\_deps\, \finalize\_module\, \finalize\_resources\, \freeze\_module\, \generate\_resources\, \handle\_entry\_resource\, \load\, \module\_graph\_updated\, \parse\, \process\_module\, \resolve\, \transform\, and \update\_modules\. These definitions enable plugins to interact with the module graph, resolve dependencies (including new \HmrUpdate\ and \DynamicEntry\ kinds), and handle Hot Module Replacement (HMR) events with explicit added/removed/updated module tracking.
crates/core/src/plugin/hooks · high confidence
New script analysis and module system toolkit
The \crates/toolkit/src/script\ module has been introduced to provide the core infrastructure for JavaScript/TypeScript compilation. This includes statement analysis for tracking imports, exports, and defined identifiers (supporting tree-shaking), automatic detection of module systems (ESM, CommonJS, or Hybrid) based on AST and dependency analysis, and utilities for transforming modules between systems (e.g., ESM to CommonJS). The toolkit also integrates minification via SWC, source map merging, and runtime wrapping for Farm's module execution environment.
crates/toolkit/src/script · high confidence
New script-entry example demonstrating dual CJS/ESM bundling
The \examples/script-entry\ directory now includes a complete example project that builds a library targeting both CommonJS (CJS) and ES Module (ESM) formats for the Node.js environment. The configuration (\farm.config.cjs.ts\ and \farm.config.ts\) sets up separate output paths (\dist/cjs\ and \dist/esm\) with specific entry filenames (\.cjs\ and \.mjs\). The example demonstrates externalizing Node.js built-in modules, using the \dts\ plugin for type definitions, and configuring script options like \importNotUsedAsValues: 'remove'\. Included test scripts (\test-cjs.cjs\ and \test.mjs\) verify that the built artifacts correctly expose the \lodashMerge\ utility and maintain the expected external module list.
examples/script-entry · high confidence
New standalone Playwright-based E2E test runner
The project now includes a dedicated end-to-end testing infrastructure in the \e2e/\ directory, replacing the previous Vitest-based approach. This new runner uses Playwright to execute browser-based tests against example applications, providing utilities to start, watch, and preview projects while asserting on page content, console errors, and network requests. It features a custom assertion library (\expect\), a spec runner with context support, and robust process management to handle browser lifecycles and clean up stale processes across Windows and Unix environments.
e2e · high confidence
New utility crate for string handling, hashing, and path operations
A new \crates/utils\ library has been introduced to provide shared helper functions across the project. It includes \FarmBytesStr\, a zero-copy string type with precomputed hashing for efficient comparison and storage, and utility functions for SHA-256 hashing and Base64 encoding/decoding, with the latter specifically hardened to handle Windows long path issues. Additionally, the crate provides robust query string parsing and serialization, as well as platform-independent relative path calculation, ensuring stable path representations across different operating systems.
crates/utils/src · high confidence
React Fast Refresh support in the Rust plugin
The Rust React plugin now enables React Fast Refresh (HMR) for JSX/TSX modules in development mode. It injects the React Refresh runtime, registers component exports, and validates module boundaries to allow safe state-preserving updates. This is controlled by the plugin's \refresh\ option (enabled by default in dev) and is automatically disabled for non-browser targets.
rust-plugins/react · high confidence
Repository initialized with comprehensive configuration and documentation
The repository has been initialized with the foundational structure for the Farm build tool, including a Rust + TypeScript monorepo setup using pnpm workspaces and Cargo. This adds essential configuration files such as \.editorconfig\, \.npmrc\ (with pnpm settings), \biome.json\ for linting/formatting, \tsconfig.base.json\, and \vitest.config.ts\. It also introduces project documentation files like \README.md\, \CONTRIBUTING.md\, \AGENTS.md\, and \CLAUDE.md\ to guide development and AI assistant usage, alongside a \pnpm-workspace.yaml\ defining the package structure.
(repo-wide) · high confidence
Structured compilation error reporting with JSON serialization
The build system now provides structured, machine-parseable error messages for compilation failures. A new \CompilationError\ enum defines specific error types—including resolve, load, transform, parse, and plugin hook errors—each serializable to JSON via \serde\. This allows tooling and users to programmatically inspect error details (such as the source file, importer, and potential causes) rather than relying solely on unstructured text logs, improving debugging efficiency for issues like missing dependencies or syntax errors.
crates/core/src/error · high confidence
Support for \`new URL(..., import.meta.url)\` pattern
The build system now transforms the standard \new URL('path', import.meta.url)\ pattern into an optimized form using \import.meta.glob\. This allows developers to reference assets relative to the current module using standard ES module syntax, with the build tool automatically handling the globbing and eager loading of those resources.
_crates/plugin\_script/src/transform\_import\_meta\url · high confidence
Support for import.meta.glob pattern matching
The build system now supports the \import.meta.glob\ syntax, allowing developers to import multiple modules matching a glob pattern (e.g., \./dir/\*.js\) which are automatically resolved and transformed into a map of module references. This feature enables dynamic, pattern-based imports similar to those found in Vite, with support for options like \eager\ loading and \url\ queries.
_crates/swc\_transformer\_import\glob/src · high confidence
Website documentation site and CI/CD infrastructure added
The website directory now contains a complete Docusaurus-based documentation site for Farm, including configuration files (babel.config.js, biome.json, components.json), a full set of documentation pages covering advanced features (minification, partial bundling, persistent cache, SSR, tree shaking), API references (HMR, JavaScript, JS plugin), and a blog index. Additionally, GitHub Actions workflows for testing and deploying the site to GitHub Pages have been added, along with standard project files like .gitignore, LICENSE, and README.
website · high confidence
Removals
create-farm v2.0.0-beta.4 removes FreeBSD binary support
The \create-farm\ scaffolding tool has dropped support for FreeBSD binaries in its v2.0.0-beta.4 release. Users on FreeBSD systems will no longer be able to use the precompiled native binary for project creation and may need to rely on alternative installation methods or wait for future support updates.
packages/create-farm · high confidence
Behavioural changes
Add package.json sideEffects parsing logic
The build system now parses the \sideEffects\ field from \package.json\ files to support tree-shaking optimizations. This change introduces a \PackageJsonInfo\ struct in the core common module that reads the raw package metadata and converts \sideEffects\ configurations (either boolean or array of glob patterns) into matchers, enabling the bundler to correctly identify which files have side effects and can be safely removed during optimization.
crates/core/src/common · high confidence
Add top-level await example for Farm v2
The top-level await example has been updated to use Farm v2, featuring a new \farm.config.ts\ configuration that disables persistent caching and sourcemaps, alongside a complete set of source files demonstrating top-level await usage in dynamic imports and module exports.
examples/top-level-await · high confidence
Added Farm build configuration and entry point for component-classes example
The component-classes example now includes a Farm build configuration (farm.config.mjs) and a corresponding entry point (index.js). The configuration sets up the build to use the local 'component-classes' package as the input, disables minification, and outputs the result as an ES module (.mjs). This change introduces a new build toolchain for this specific example, replacing or supplementing previous build methods.
examples/component-classes · medium confidence
Added static assets to the public-path example
The public-path example now includes a CSS file (style.css) that applies red text styling and a JavaScript file (test.js) that logs a message and appends a div to the document body. These additions support the example's demonstration of public path configuration by providing static resources that can be fetched.
examples/public-path/public · high confidence
Corrected CommonJS require handling for library targets
The CommonJS-to-ESM transformation logic in the toolkit has been updated to properly handle \require\ calls when the build target is a library. This change introduces new modules (\handle\_exports\, \transform\_cjs\, \transform\_hybrid\) to manage the conversion process, ensuring that \require\ statements are correctly resolved and exported, which fixes issues where library builds previously failed to handle CommonJS dependencies accurately.
_crates/toolkit/src/script/transform\_to\esm · medium confidence
Enforce linting on pre-commit
The repository now automatically runs lint-staged on every commit, ensuring that staged files are linted before they are committed. This change introduces a pre-commit hook to maintain code quality standards consistently across the project.
.husky · high confidence
Fixes nested public and output directory configuration
The compiler now detects when the public directory and output directory are nested within each other. If such a configuration is detected, the build process skips copying the public directory and prints a warning to prevent infinite nesting issues during the build.
crates/compiler/src/write · high confidence
Improved tree-shaking precision for exports and statements
The tree-shaking plugin now more accurately removes unused code by introducing dedicated logic to prune unused export identifiers and useless statements. This change ensures that unused named, default, and namespace exports are correctly identified and stripped, and that unused import/export specifiers are removed from the final bundle, leading to smaller output sizes and cleaner generated code.
_crates/plugin\_tree\_shake/src/tree\_shake\modules · high confidence
Improved tree-shaking precision for namespace imports and side effects
The tree-shaking logic in the statement graph has been refactored to more accurately track dependencies and side effects. It now supports optimizing \import \* as\ namespace imports by analyzing which specific fields are accessed, allowing unused namespace properties to be removed. Additionally, the analysis of side effects has been enhanced to correctly identify writes to top-level variables, and the dependency graph now better handles cross-module top-level variable references and namespace fallbacks for literal computed properties.
_crates/plugin\_tree\_shake/src/statement\graph · high confidence
Introduce Farm v2.0 runtime module system with plugin support
The \@farmfe/runtime\ package has been rewritten for the Farm v2.0 release, introducing a new module system that supports browser, Node.js, and library targets. This runtime now features a plugin architecture with hooks for module lifecycle events (such as \bootstrap\, \moduleCreated\, and \readModuleCache\) and custom resource loading, enabling developers to extend the module resolution and loading behavior. It also includes helpers for CommonJS/ESM interop (e.g., \import default\, \export \* from\) and supports top-level await, dynamic imports, and external module integration.
packages/runtime · high confidence
Introduce Rust-based HTML plugin with base inheritance and absolute path handling
The HTML processing logic has been rewritten in Rust (crates/plugin\_html/src), replacing the previous implementation. This new plugin introduces support for HTML base inheritance via the \html.base\ configuration, allowing child pages to extend a shared template. It also adds an \AbsolutePathHandler\ that automatically prefixes absolute paths in \\<script src\>\ and \\<link href\>\ attributes with the configured public path, ensuring correct resource resolution. Additionally, the plugin now handles inline CSS and JS modules by generating virtual module IDs and injecting runtime resources directly into the HTML AST.
_crates/plugin\html/src · high confidence
Introduce partial bundling algorithm to optimize resource pot generation
The \plugin\_partial\_bundling\ crate now implements a new bundling strategy that replaces the previous module grouping logic. This change introduces a multi-stage process: first, it builds a \ModuleGroupGraph\ to distinguish between entry and dynamic import dependencies; second, it generates \ModuleBuckets\ and groups them by module group; third, it creates \ModulePots\ based on configuration rules (such as immutable packages or custom groups) and splits large pots to respect \target\_max\_size\; finally, it merges these pots into \ResourcePots\ while enforcing \target\_min\_size\ and \target\_concurrent\_requests\ limits. This results in more granular and size-controlled output bundles, improving initial load performance and cacheability.
_crates/plugin\_partial\bundling/src · high confidence
Introduces persistent caching for resource pots with incremental build support
The resource cache now supports persistent storage and incremental builds. A new \ResourcePotMemoryStore\ manages cached resources (including their metadata and content hashes) in memory while coordinating with a persistent store to write changes to disk. This enables the build system to detect when resource pots have changed and only re-process modified items, improving build performance.
_crates/core/src/cache/resource\cache · high confidence
Introduces persistent, immutable module caching to improve build performance
The module cache now supports persistent storage for immutable modules (such as dependencies), allowing them to be cached across builds rather than only in memory. This change introduces new internal components—\ImmutableModulesMemoryStore\, \MutableModulesMemoryStore\, and \ModuleMetadataStore\—to manage distinct caching strategies for immutable versus mutable code. By persisting immutable modules, the build system can skip re-processing unchanged dependencies, significantly reducing memory usage and improving incremental build speeds.
_crates/core/src/cache/module\cache · high confidence
Introduces structured module metadata for caching and compilation
The build system now tracks detailed metadata for script, CSS, and HTML modules to support advanced compilation features like Hot Module Replacement (HMR) and tree shaking. This change adds a new \ModuleMetaData\ enum and specific structs (e.g., \ScriptModuleMetaData\, \CssModuleMetaData\) that store ASTs, export/import maps, and HMR acceptance flags. It also introduces a \CustomMetaDataMap\ with serialization support for caching and a \FeatureFlag\ system to track specific JavaScript capabilities (such as top-level await or dynamic imports) within modules.
_crates/core/src/module/meta\data · high confidence
Migrate react-antd-mobile example to Farm v2 build system
The react-antd-mobile example has been migrated from its previous build setup to Farm v2. This introduces a new \farm.config.ts\ configuration file that sets the build target to legacy browsers (IE 10+ for CSS, ES5 for scripts) and configures plugins for React, Sass, Less, and PostCSS. The project now uses React Router v6 with hash-based routing, includes environment-specific configuration files (\.env.development\, \.env.production\), and defines browser support targets in \.browserslistrc\. The entry point has been updated to use \createRoot\ for React 18 rendering.
examples/react-antd-mobile · high confidence
New React + TypeScript template for Farm
The React template in the project scaffolding tool has been replaced with a new implementation. Users generating a new React project will now receive a setup using TypeScript, the \@farmfe/plugin-react\ plugin, and modern tooling configurations (ES2020 target, bundler module resolution). The template includes a standard entry point, CSS styling with dark/light mode support, and a demo component to verify Hot Module Replacement (HMR).
crates/create-farm-rs/templates/react · high confidence
New Rust-based HMR update engine
The development server's Hot Module Replacement (HMR) system has been rewritten in Rust to improve reliability and performance. This change introduces a new module graph diffing and patching mechanism that accurately tracks added, removed, and updated modules, ensuring that only affected parts of the application are recompiled. It also includes precise HMR boundary detection to prevent unnecessary full-page reloads and integrates with the module group graph to handle dynamic imports and partial bundling correctly during updates.
crates/compiler/src/update · high confidence
New Rust-based Sass plugin using Grass
The Sass compilation capability has been replaced with a new Rust plugin (\rust-plugins/sass\) that utilizes the Grass library. This implementation provides native Sass processing within the Farm build system, including URL rebasing for assets and support for CSS imports, replacing the previous Vite-based adapter.
rust-plugins/sass · high confidence
New base configuration for Farm JS plugin builds
A new base configuration file (configs/farm-js-plugin.base.config.mjs) has been introduced to standardize build settings for Farm JS plugins. This configuration sets up a library-targeted build that outputs both ESM and CJS formats to a 'build' directory, explicitly externalizes the @farmfe/core package and Node.js built-in modules, and disables development features like HMR, minification, sourcemaps, and persistent caching by default.
configs · high confidence
New core configuration schema for build targets, bundling, and asset handling
The build system now uses a comprehensive, structured configuration model defined in \crates/core/src/config\. Users can now explicitly control the output target environment (browser, node, or library) and module format (ESM, CommonJS, UMD, IIFE, System, AMD) via \output.targetEnv\ and \output.format\. Asset path generation behavior is configurable through \assets.mode\ (Node or Browser), and partial bundling is tuned via \partialBundling\ settings such as target sizes, concurrent request limits, and module grouping. CSS processing is exposed with \css.modules\ for naming conventions and \css.prefixer\ for browser targets, while script compilation allows fine-grained control over decorators, parser syntax, and import handling. Additionally, persistent caching is enabled by default with configurable strategies, and minification, tree-shaking, and external module resolution are now governed by dedicated, extensible config objects.
crates/core/src/config · high confidence
New incremental resource regeneration logic for HMR
The compiler now uses a new \regenerate\_resources\ module to handle hot module replacement updates. This logic distinguishes between immutable and mutable modules, generating separate update resources for each to optimize HMR performance. It also implements a diff-and-patch strategy for resource pots, ensuring that only affected modules trigger re-rendering while preserving existing bundles where possible.
_crates/compiler/src/update/regenerate\resources · high confidence
New modular minification logic for JS, CSS, and HTML
The minification logic has been restructured into a new \crates/toolkit/src/minify\ module, introducing separate handling for JavaScript, CSS, and HTML assets. JavaScript minification now normalizes Terser-based compression and mangling options, applying specific defaults like \const\_to\_let\ and top-level optimizations for resource pots while disabling top-level transforms for individual modules. CSS and HTML are minified using dedicated SWC minifiers with configurable options. A new comment-handling utility allows preserving license comments (e.g., \@lic\, \@copyright\) or stripping all comments based on configuration, aligning with standard minifier behaviors.
crates/toolkit/src/minify · high confidence
New module concatenation implementation for JavaScript bundling
The script concatenation logic in the toolkit has been replaced with a new implementation that merges multiple JavaScript modules into a single AST. This change introduces specific handling for dynamic imports by transforming them into synchronous namespace references when the target module is part of the bundle, while preserving external imports. It also includes a new identifier renaming system to prevent naming collisions across concatenated modules and dedicated logic to manage external module imports and exports correctly.
_crates/toolkit/src/script/concatenate\modules · high confidence
New module resolution logic for browser fields and package exports/imports
The resolver now implements logic to handle the \browser\ field in \package.json\ (mapping source paths or disabling modules) and supports the Node.js \exports\ and \imports\ fields. This includes condition-based resolution (e.g., \import\, \require\, \browser\, \node\, \production\, \development\) and strict export validation, allowing for more accurate package resolution in modern JavaScript environments.
_crates/plugin\resolve/src/resolver · high confidence
New resource generation and caching pipeline
The compiler's generate stage has been restructured into a dedicated module that introduces a new resource caching system and refines how output files are named. The new \resource\_cache\ logic allows the build to skip rendering unchanged resource pots by checking module IDs, content hashes, and tree-shaking states, which speeds up subsequent builds. Additionally, the \render\_resource\_pots\ logic now explicitly handles library mode by mapping modules to their JS resource filenames and replacing bundle placeholders, while also applying entry-specific or generic filename transformations with content hashes to the final output assets.
crates/compiler/src/generate · high confidence
New scope-hoisted module rendering and external module handling in resource pots
The \render\_resource\_pot\ module has been restructured to support scope hoisting and improved external module resolution. It now groups modules for scope hoisting via \scope\_hoisting.rs\ and merges their ASTs into a single runtime object using \merge\_rendered\_module.rs\. External modules are handled distinctly for Node.js (using \import\/\require\ and registering them in the farm global namespace) and browsers (reading from the \window\ object), as implemented in \external.rs\. Additionally, \transform\_async\_module.rs\ introduces support for async modules by transforming sequential \farmRequire\ calls into parallel \Promise.all\ executions, and \source\_replacer.rs\ ensures import sources are replaced with their resolved module IDs.
_crates/plugin\_runtime/src/render\_resource\pot · high confidence
Rewritten \`create-farm\` CLI with dry-run support and Tauri 2 templates
The \create-farm\ project scaffolding tool has been rewritten in Rust using \clap\ for argument parsing, introducing a \--dry-run\ flag that allows users to preview changes without modifying the filesystem. The tool now supports Tauri 2 templates alongside existing Tauri and Electron options, and automatically detects the package manager (pnpm, yarn, npm, or bun) to suggest appropriate installation and development commands.
crates/create-farm-rs/src · high confidence
Rust plugins updated for Farm v2.0 beta and build tooling compatibility
The Rust plugins in this directory (auto-import, compress, dsv, dts, icons) have been updated to version 2.0.0-beta.1 to align with the Farm v2.0 beta release. This update fixes build script and tooling compatibility with the napi-rs CLI by stripping the legacy \--cargo-name\ flag and using \-p \<cargo-package\>\ instead, ensuring correct package targeting during publish. Additionally, the plugins now include pre-built binaries for a wider range of platforms, including Windows ia32 and arm64, and Linux musl variants, improving cross-platform support.
rust-plugins · high confidence
Scaffold Farm v2 plugins with updated JS and Rust templates
The \create-farm-plugin\ CLI now generates project scaffolds aligned with Farm v2.0. The JavaScript template includes a \farm.config.ts\ configured for ESM/CJS output with \@farmfe/js-plugin-dts\ and a React/TypeScript playground using \@farmfe/plugin-react\. The Rust template is updated to use \napi-rs\ with a \nightly-2024-10-07\ toolchain, pre-configured multi-platform CI workflows, and a playground that integrates the generated Rust plugin alongside React. Both templates now use pnpm workspaces and include comprehensive \.gitignore\ files.
packages/create-farm-plugin · high confidence
Visualizer client UI and build configuration
The Visualizer client now uses a Farm v2 build setup with Tailwind CSS for styling and Vue Router for navigation. The interface provides a Dashboard, Compilation Analysis (with module/plugin/hook details and code diffs), Bundle Analysis (resource pots and file trees), and Plugin Performance views, all powered by new API endpoints and Vue components.
js-plugins/visualizer · high confidence
Vue plugin rewritten in Rust using fervid
The \@farmfe/plugin-vue\ implementation has been ported from JavaScript (unplugin-vue) to a Rust plugin powered by the fervid compiler. This change replaces the previous JS-based compilation logic with a native Rust module that handles Vue 3 Single File Component (SFC) compilation, style scoping, and virtual module generation. The new plugin exposes configuration options for include/exclude patterns, custom element detection, SSR, source maps, and props destructuring, mirroring the feature set of the original unplugin-vue but executing within the Farm build pipeline via Rust.
rust-plugins/vue · high confidence
Fixes
Add example reproducing micromark-util-symbol resolver priority issue
Added a new example case (examples/issues1433) that demonstrates a resolver priority issue by importing specific symbols (codes, constants, types, values) from the 'micromark-util-symbol' package and logging them. The example includes a Farm configuration targeting the Node environment to facilitate this reproduction.
examples/issues1433 · medium confidence
Test coverage
Added ArcGIS e2e fixtures for Human Geography Dark basemap and ACS income data; Added HTML fixture for build-stage testing; Added browser module resolution test fixtures; Added compiler test fixtures for complex bundling scenarios; Added compiler test suite for bundling, CSS, and library outputs; Added runtime bundle test fixtures for CommonJS and hybrid export scenarios; Added snapshot tests for environment variable rendering; Added test coverage for the resolve plugin; Added test fixture for CSS and asset tree-shaking in development mode; Added test fixture for CSS dependency analysis; Added test fixture for CSS minification with imports; Added test fixture for CSS prefixer normal behavior; Added test fixture for CommonJS module export order; Added test fixture for HTML minification output; Added test fixture for basic partial bundling scenarios; Added test fixture for import equals syntax; Added test fixture for import.meta.hot HMR behavior; Added test fixtures for CJS and ESM external module handling; Added test fixtures for CSS absolute URL and data-URI handling; Added test fixtures for CSS module HMR updates; Added test fixtures for CSS module and raw CSS import handling; Added test fixtures for CSS module composition and global selectors; Added test fixtures for CSS module scoping modes; Added test fixtures for HMR accept callbacks; Added test fixtures for HMR dependency acceptance; Added test fixtures for Node.js module exports resolution; Added test fixtures for Tailwind CSS plugin runtime and SWC helpers; Added test fixtures for absolute specifier and double-dot resolution; Added test fixtures for browser external library handling; Added test fixtures for comment preservation in script bundling; Added test fixtures for external module hosting and native top-level await; Added test fixtures for import.meta.url and import.meta.glob behavior; Added test fixtures for lazy compilation behavior; Added test fixtures for library mode compilation scenarios; Added test fixtures for minifying script functions with dependencies; Added test fixtures for node\_modules resolution scenarios; Added test fixtures for script and resolve scenarios; Added test fixtures for script minification scenarios; Added test fixtures for script plugin load/parse/analyze; Added test fixtures for tree-shaking scenarios; Added test infrastructure for compiler configuration and runtime setup; Added test utilities for the tree-shake plugin; Added test utility for script plugin module processing; Added testing helper macros and module graph construction utilities; Added tests for CSS dependency analysis and alias resolution; Added tests for HMR self-acceptance detection; Added tests for HTML plugin build stage; Added tests for JSON plugin load and transform hooks; Added tests for import.meta.glob transformation; Added tests for module graph diffing and patching logic; Added tests for package.json resolution and script module parsing; Added tests for partial bundling module group graph logic; Added tests for resolve-kind module resolution; Added tests for script plugin dependency analysis and module system detection; Added tests for tree-shaking useless statements and export handling; Added unit tests for side-effect analysis in tree shaking; Updated test snapshots for partial bundling resource pot generation.
Dependencies
Farm v2.0.0-beta.11 release with SWC upgrade and config fixes
The @farmfe/core package has been updated to version 2.0.0-beta.11. This release upgrades all SWC-related crates to the latest versions (swc\_core v59.0.1) and fixes an issue with nested public and output configuration. It also updates the dependency @farmfe/plugin-replace-dirname to version 2.0.0-beta.1.
packages/core · high confidence
Initial Rust dependency lockfile and workspace configuration
The project now includes a Cargo.lock file and a root Cargo.toml workspace configuration, establishing the Rust dependency graph and build settings for the first time. This change introduces the initial set of Rust crates and their versions required for the build system, including the workspace members and dependency definitions.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 30 → 36 (+6.6)
- Rubric changed (rubric-2026.09.10 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 81 → 80 (-0.4)
- Architecture 70 → 74 (+3.7)
- Maturity 79 → 78 (-0.0)
- Readiness 31 → 26 (-4.3)
- Security 8 → 26 (+18.5)
- Accessibility 50 → 50 (-0.0)
- Performance 66 (new)
Resolved (589)
- Change-coupling hub: index.ts → resources_injector.rs, index.d.ts, binding.ts, share.ts (packages/core/src/config/index.ts)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [CVE redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Documentation: no architecture or design documentation (website/README.md)
- Documentation: no installation or build instructions (rust-plugins/icons/README.md)
- High CVE: [CVE redacted] (pnpm-lock.yaml)
- High CVE: [CVE redacted] (pnpm-lock.yaml)
- …and 569 more
New (121)
- Change coupling: index.ts ↔ binding.ts (packages/core/src/config/index.ts)
- Change coupling: index.ts ↔ share.ts (packages/core/src/config/index.ts)
- Confusing Constructor Naming: new_without_internal_plugins is a verbose and awkward name for a constructor variant. It suggests a special case rather than a standard builder pattern or factory method.
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [CVE redacted] (pnpm-lock.yaml)
- High CVE: [CVE redacted] (pnpm-lock.yaml)
- High CVE: [CVE redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- …and 101 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
farm-fe/farm was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 30 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 2000ef8a790a1b565d1687cfe70564270a826e15 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-505904ce13c1.