Solid
Create a Solid project based on Farm.
Farm provides two approaches to support creating Solid projects:
- Use the
create-farmscaffold to create a scaffold project - You can manually create a
Solidproject following the current documentation
Creating a Solid Project
sh
npm create farm@latestsh
yarn create farm@latestsh
pnpm create farm@latestsh
bun create farm@latestSelect Solid template in Select Framework
farm.config.ts
import { defineConfig } from '@farmfe/core';
import solid from 'vite-plugin-solid';
export default defineConfig({
vitePlugins: [
() => ({
vitePlugin: solid(),
filters: ['\\.tsx$', '\\.jsx$']
})
]
});
If you want to start DevServer
sh
npm devsh
yarn devsh
pnpm devsh
bun devIf you need to run the build production environment product command
sh
npm buildsh
yarn buildsh
pnpm buildsh
bun buildIf you need to preview your build product
sh
npm previewsh
yarn previewsh
pnpm previewsh
bun previewFor more example details: Solid Example
Farm