Skip to main content

Quick Start

Nightly Warning

If you are using version 2.0.0-nightly, please note the following:

  • The Farm team is working hard on version 2.0. We have refactored the entire Node backend and added many practical features. Please check our RoadMap for future updates.

  • This is a nightly build version that may contain new features and fixes that haven't been fully tested. As a result, unstable behavior or unexpected errors may occur.

  • Since this version is in the development phase, features and APIs may change in future versions. Please regularly check the changelog for the latest information.

  • We recommend against using this version in production environments unless you are prepared to handle potential issues.

If you encounter any problems, please feel free to create an Issue to provide feedback to us. Your feedback is crucial for improving Farm's functionality and stability. and we will continue to update the documentation in the coming days. Thank you for your understanding and support.

warning

Farm needs Node 16.18.0 and above.

Online experience

Edit Farm

Create a Farm Project

npm
yarn
pnpm
bun
warning

If you are using the nightly version, you need to install all Farm dependencies as nightly versions. We have provided nightly versions for all core packages and plugins. e.g:

npm
yarn
pnpm
bun
Then follow the prompts!

You can also directly specify the project name and the template you want to use via additional command line options:

npm
yarn
pnpm
bun
TemplateDescriptionOptional Features
vanillaVanilla JavaScriptTypeScript
reactreact18TypeScript
vue3vue3TypeScript
vue2vue2TypeScript
sveltesvelteTypeScript
solidsolidTypeScript
preactpreactTypeScript
litlitTypeScript
nestjsnestjsTypeScript
tauritauri2TypeScript
electronelectronTypeScript

2. Start the Project

Choose the package manager you like, install dependencies, then start the project. Then, start the project:

npm
yarn
pnpm
bun

The project will start at http://localhost:9000 by default.

3. Configuring the Project

The project is configured by farm.config.ts/js/mjs file in the root directory of the project.

farm.config.ts
note

See Configuring Farm for details.

4. Building the project

Build the Farm project as production-ready static files:

npm
yarn
pnpm
bun

The built product is downgraded to ES2017 by default, and the product will be compressed and Tree Shake. If you want to preview the build product locally, you can execute npm run preview or npx farm preview.

note

See Build For Production for details.

4. Preview the build products

Start preview server

npm
yarn
pnpm
bun

Next Steps


Extremely Fast Web Build Tool Written in Rust

Copyright © 2024 Farm Community. Built with Docusaurus.