Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7717409

Browse files
authored
feat: support farm (#169)
1 parente5905c5 commit7717409

File tree

11 files changed

+873
-120
lines changed

11 files changed

+873
-120
lines changed

‎examples/farm/farm.config.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import{defineConfig}from'@farmfe/core'
2+
importVuefrom'unplugin-vue/farm'
3+
4+
exportdefaultdefineConfig({
5+
plugins:[Vue()],
6+
compilation:{
7+
progress:false,
8+
persistentCache:false,
9+
},
10+
})

‎examples/farm/index.html‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<htmllang="en">
3+
4+
<head>
5+
<metacharset="utf-8"/>
6+
<metaname="viewport"content="width=device-width, initial-scale=1"/>
7+
<linkrel="icon"type="image/svg+xml"href="/favicon.ico"/>
8+
<title>Farm + Vue3 + TS</title>
9+
</head>
10+
11+
<body>
12+
<divid="app"></div>
13+
<scriptsrc="./src/main.ts"></script>
14+
</body>
15+
16+
</html>

‎examples/farm/package.json‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name":"farm-vue",
3+
"version":"1.0.0",
4+
"private":true,
5+
"scripts": {
6+
"dev":"farm start",
7+
"start":"farm start",
8+
"build":"farm build",
9+
"preview":"farm preview",
10+
"clean":"farm clean"
11+
},
12+
"dependencies": {
13+
"vue":"^3.4.0"
14+
},
15+
"devDependencies": {
16+
"@farmfe/cli":"2.0.0-nightly-20250411100807",
17+
"core-js":"^3.30.1",
18+
"unplugin-vue":"workspace:*"
19+
}
20+
}

‎examples/farm/public/favicon.ico‎

4.06 KB
Binary file not shown.

‎examples/farm/src/App.vue‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script setup lang="ts">
2+
import {ref }from'vue'
3+
const msg=ref('')
4+
</script>
5+
6+
<template>
7+
<div>
8+
<h1>Hello world</h1>
9+
<h2>{{ msg }}</h2>
10+
<inputv-model="msg"type="text" />
11+
</div>
12+
</template>

‎examples/farm/src/main.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import{createApp}from'vue'
2+
importAppfrom'./App.vue'
3+
4+
createApp(App).mount('#app')

‎examples/farm/tsconfig.json‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"compilerOptions": {
3+
"target":"ES2020",
4+
"useDefineForClassFields":true,
5+
"module":"ESNext",
6+
"lib": ["ES2020","DOM","DOM.Iterable"],
7+
"skipLibCheck":true,
8+
9+
/* Bundler mode*/
10+
"moduleResolution":"bundler",
11+
"allowImportingTsExtensions":true,
12+
"resolveJsonModule":true,
13+
"isolatedModules":true,
14+
"noEmit":true,
15+
"jsx":"preserve",
16+
17+
/* Linting*/
18+
"strict":true,
19+
"noUnusedLocals":true,
20+
"noUnusedParameters":true,
21+
"noFallthroughCasesInSwitch":true
22+
},
23+
"include": ["src/**/*.ts","src/**/*.tsx","src/**/*.vue"],
24+
}

‎package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"./rollup":"./dist/rollup.js",
4040
"./rolldown":"./dist/rolldown.js",
4141
"./esbuild":"./dist/esbuild.js",
42+
"./farm":"./dist/farm.js",
4243
"./api":"./dist/api.js",
4344
"./*":"./*"
4445
},
@@ -70,6 +71,7 @@
7071
},
7172
"devDependencies": {
7273
"@babel/types":"^7.27.0",
74+
"@farmfe/core":"2.0.0-nightly-20250411141103",
7375
"@jridgewell/gen-mapping":"^0.3.8",
7476
"@jridgewell/trace-mapping":"^0.3.25",
7577
"@sxzz/eslint-config":"^6.1.1",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp