├── .npmrc ├── plugins └── uno.ts ├── .eslintrc ├── .eslintignore ├── .gitignore ├── pages ├── index.vue └── hi │ └── _id.vue ├── layouts └── default.vue ├── styles └── main.css ├── netlify.toml ├── composables └── count.ts ├── components ├── Footer.vue ├── DarkToggle.vue ├── Counter.vue ├── Logos.vue └── InputEntry.vue ├── tsconfig.json ├── package.json ├── nuxt.config.ts ├── static ├── nuxt.svg └── vite.svg └── README.md /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | -------------------------------------------------------------------------------- /plugins/uno.ts: -------------------------------------------------------------------------------- 1 | import 'uno.css' 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@antfu" 3 | } 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | wp-dist 2 | dist 3 | node_modules 4 | assets 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .nuxt 3 | *.log 4 | dist 5 | wp-dist 6 | .output 7 | -------------------------------------------------------------------------------- /pages/index.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /layouts/default.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /styles/main.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #app { 4 | height: 100vh; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html.dark { 10 | background: #222; 11 | color: white; 12 | } 13 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build.environment] 2 | NPM_FLAGS = "--prefix=/dev/null" 3 | NODE_VERSION = "14" 4 | 5 | [build] 6 | publish = "dist" 7 | command = "npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build" 8 | 9 | [[redirects]] 10 | from = "/*" 11 | to = "/index.html" 12 | status = 200 13 | -------------------------------------------------------------------------------- /composables/count.ts: -------------------------------------------------------------------------------- 1 | export function useCount() { 2 | const count = useState('count', () => Math.round(Math.random() * 20)) 3 | 4 | function inc() { 5 | count.value += 1 6 | } 7 | function dec() { 8 | count.value -= 1 9 | } 10 | 11 | return { 12 | count, 13 | inc, 14 | dec, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /components/Footer.vue: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /components/DarkToggle.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.nuxt/tsconfig.json", 3 | "compilerOptions": { 4 | "types": [ 5 | "node", 6 | "unplugin-vue2-script-setup/types" 7 | ] 8 | }, 9 | "vueCompilerOptions": { 10 | "experimentalCompatMode": 2, 11 | "experimentalTemplateCompilerOptions": { 12 | "compatConfig": { "Mode": 2 } // optional 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /components/Counter.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | -------------------------------------------------------------------------------- /pages/hi/_id.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 28 | -------------------------------------------------------------------------------- /components/Logos.vue: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "nuxi dev", 5 | "build": "nuxi generate", 6 | "start": "node .output/server/index.mjs" 7 | }, 8 | "devDependencies": { 9 | "@antfu/eslint-config": "^0.16.1", 10 | "@iconify/json": "^2.1.7", 11 | "@nuxt/bridge-edge": "latest", 12 | "@nuxt/kit-edge": "latest", 13 | "@unocss/nuxt": "^0.26.3", 14 | "@vue/runtime-dom": "^3.2.31", 15 | "@vueuse/core": "^7.6.2", 16 | "eslint": "^8.10.0", 17 | "nuxi-edge": "latest", 18 | "nuxt-edge": "latest", 19 | "typescript": "4.5.5" 20 | }, 21 | "pnpm": { 22 | "overrides": { 23 | "vue-demi": "0.12.0" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /nuxt.config.ts: -------------------------------------------------------------------------------- 1 | import { defineNuxtConfig } from '@nuxt/bridge-edge' 2 | 3 | export default defineNuxtConfig({ 4 | buildModules: [ 5 | '@unocss/nuxt', 6 | '@vueuse/core/nuxt', 7 | '@nuxt/bridge-edge', 8 | ], 9 | css: [ 10 | '@unocss/reset/tailwind.css', 11 | '~/styles/main.css', 12 | ], 13 | target: 'static', 14 | components: true, 15 | bridge: { 16 | vite: true, 17 | }, 18 | unocss: { 19 | shortcuts: [ 20 | ['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'], 21 | ], 22 | uno: true, 23 | attributify: true, 24 | icons: { 25 | scale: 1.2, 26 | }, 27 | }, 28 | }) 29 | -------------------------------------------------------------------------------- /components/InputEntry.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 33 | -------------------------------------------------------------------------------- /static/nuxt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /static/vite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Archived. Try the [Nuxt 3 version](https://github.com/antfu/vitesse-nuxt3) instead. 2 | 3 | ---- 4 | 5 |

6 | 7 |

8 | 9 |

Vitesse Nuxt Bridge

10 | 11 |

12 | Vitesse experience for Nuxt 2 and Vue 2. 13 |


14 | 15 | 16 | ## Features 17 | 18 | - [💚 Nuxt Bridge](https://v3.nuxtjs.org/getting-started/bridge) - Experience Nuxt 3 features on existing Nuxt 2 projects. 19 | 20 | - ⚡️ Vite - Instant HMR 21 | 22 | - 🎨 [UnoCSS](https://github.com/unocss/unocss) - The instant on-demand atomic CSS engine. 23 | 24 | - 😃 Use icons from any icon sets in Pure CSS, powered by [UnoCSS](https://github.com/unocss/unocss) 25 | 26 | - 🔥 Use the new `