-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
3,546 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { defineConfig } from "@farmfe/core"; | ||
import Vue from "unplugin-vue-fervid/vite"; | ||
|
||
export default defineConfig({ | ||
vitePlugins: [Vue()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="./src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "farm-example", | ||
"private": true, | ||
"scripts": { | ||
"dev": "farm", | ||
"build": "farm build", | ||
"preview": "farm preview" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.3.0" | ||
}, | ||
"devDependencies": { | ||
"unplugin-vue-fervid": "workspace:*", | ||
"@farmfe/core": "0.15.4", | ||
"@farmfe/cli": "0.6.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const msg = ref('') | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h1>Hello world</h1> | ||
<h2>{{ msg }}</h2> | ||
<input v-model="msg" type="text" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
|
||
createApp(App).mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"moduleResolution": "bundler" | ||
}, | ||
"include": ["src/**/*", "*"], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="./src/main.ts" type="module"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
{ | ||
"name": "vite", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
"dependencies": { | ||
"vue": "^3.4.5" | ||
}, | ||
"devDependencies": { | ||
"unplugin-vue-fervid": "workspace:*", | ||
"vite": "^5.0.11", | ||
"vite-plugin-inspect": "^0.8.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const msg = ref('') | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h1>Hello world</h1> | ||
<h2>{{ msg }}</h2> | ||
<input v-model="msg" type="text" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
|
||
createApp(App).mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"moduleResolution": "bundler" | ||
}, | ||
"include": ["src/**/*", "*"], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from 'vite' | ||
import Vue from 'unplugin-vue-fervid/vite' | ||
import Inspect from 'vite-plugin-inspect' | ||
|
||
export default defineConfig({ | ||
plugins: [Vue(), Inspect()], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "cross-env MODE=development webpack serve", | ||
"build": "rimraf dist && cross-env MODE=production webpack build", | ||
"preview": "serve dist" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.4.5" | ||
}, | ||
"devDependencies": { | ||
"@swc/core": "^1.3.102", | ||
"@types/webpack": "^5.28.5", | ||
"cross-env": "^7.0.3", | ||
"html-webpack-plugin": "^5.6.0", | ||
"serve": "^14.2.1", | ||
"sucrase": "^3.35.0", | ||
"swc-loader": "^0.2.3", | ||
"unplugin-vue-fervid": "workspace:*", | ||
"webpack": "^5.89.0", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^4.15.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Webpack</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const msg = ref('') | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h1>Hello world</h1> | ||
<h2>{{ msg }}</h2> | ||
<input v-model="msg" type="text" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
|
||
createApp(App).mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"moduleResolution": "bundler" | ||
}, | ||
"include": ["src/**/*", "*"], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Vue from 'unplugin-vue-fervid/webpack' | ||
import HtmlWebpackPlugin from 'html-webpack-plugin' | ||
import type { Configuration } from 'webpack' | ||
|
||
const config: Configuration = { | ||
mode: (process.env.MODE as any) ?? 'development', | ||
entry: { | ||
app: './src/main.ts', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
enforce: 'post', | ||
test: /\.m?ts$/, | ||
exclude: /(node_modules)/, | ||
use: { loader: 'swc-loader' }, | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
Vue(), | ||
new HtmlWebpackPlugin({ | ||
filename: 'index.html', | ||
template: 'public/index.html', | ||
}), | ||
], | ||
} | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.