Solid
Create a Solid
project based on Farm
.
Farm
provides two approaches to support creating Solid
projects:
- Use the
create-farm
scaffold to create a scaffold project - You can manually create a
Solid
project following the current documentation
Creating a Solid Project​
npm create farm@latest
Select Solid
template in Select Framework
Solid
For Solid
support, Farm
recommends using Vite
plugins.
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
npm dev
If you need to run the build production environment product command
npm build
If you need to preview your build product
npm preview
For more example details: Solid Example