Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: plugin solid #110

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions examples/solid-example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
28 changes: 28 additions & 0 deletions examples/solid-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Usage

```bash
$ npm install # or pnpm install or yarn install
```

### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)

## Available Scripts

In the project directory, you can run:

### `npm run dev`

Runs the app in the development mode.<br>
Open [http://localhost:5173](http://localhost:5173) to view it in the browser.

### `npm run build`

Builds the app for production to the `dist` folder.<br>
It correctly bundles Solid in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!

## Deployment

Learn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)
11 changes: 11 additions & 0 deletions examples/solid-example/farm.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from '@farmfe/core'
import solid from '@farmfe/js-plugin-solid'

export default defineConfig({
plugins: [solid({
})],
compilation: {
persistentCache: false,
progress: false,
}
})
13 changes: 13 additions & 0 deletions examples/solid-example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Solid + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
29 changes: 29 additions & 0 deletions examples/solid-example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "solid-example",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "farm dev",
"start": "vite dev --port 5412",
"build": "farm build",
"preview": "farm preview"
},
"dependencies": {
"@hope-ui/solid": "^0.6.7",
"@solidjs/router": "^0.8.3",
"@stitches/core": "^1.2.8",
"solid-js": "^1.9.3"
},
"devDependencies": {
"@farmfe/cli": "/Users/adny/rust/farm/packages/cli",
"@farmfe/core": "/Users/adny/rust/farm/packages/core",
"@farmfe/js-plugin-solid": "workspace:*",
"typescript": "~5.6.2",
"vite": "^6.0.5",
"vite-plugin-solid": "^2.11.0"
},
"overrides": {
"@farmfe/js-plugin-solid": "workspace:*"
}
}
Loading