New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vike-vue

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vike-vue

<!-- WARNING: keep links absolute in this file so they work on NPM too -->

  • 0.6.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2K
decreased by-35.66%
Maintainers
2
Weekly downloads
 
Created
Source

npm version

vike-vue

Vue integration for Vike, see vike.dev/vue.

Introduction

UI framework Vike extensions like vike-vue:

  • implement Vike Core hooks (e.g. onRenderHtml()) on your behalf,
  • set Vike Core settings on your behalf,
  • introduce new hooks for you to implement if needed,
  • introduce new settings for you to set if needed,
  • introduce new components and component hooks.

Scaffold new app

Use Bati to scaffold a Vike app using vike-vue.

Add to existing app

To add vike-vue to an existing Vike app:

  1. Install the vike-vue npm package in your project:
npm install vike-vue
  1. Extend your existing Vike config files with vike-vue:
 // /pages/+config.h.js

+import vikeVue from 'vike-vue/config'
+
 export default {
   // Existing Vike Core settings
   // ...
+
+  // New setting introduced by vike-vue:
+  title: 'My Vike + Vue App',
+
+  extends: vikeVue
 }

Hooks

vike-vue implements the onRenderHtml() and onRenderClient() hooks on your behalf, which are essentially the glue code between Vike and Vue.

vike-vue introduces the following new hooks:

  • onCreateApp(): Allows you to extend the Vue app, typically for registering a Vue plugin.

Settings

vike-vue sets the following Vike Core settings on your behalf:

vike-vue introduces the following new settings:

  • Head: Component Component to be rendered inside the <head> tag.
  • title: string <title>...</title> tag.
  • favicon: string <link rel="icon" href="..." /> attribute.
  • lang: string <html lang="..."> attribute.
  • ssr: boolean Enable/disable Server-Side Rendering (SSR).
  • stream: boolean Enable/disable HTML streaming.
  • Layout: Component Wrapper for your Page component.

Component hooks

vike-vue introduces the following new component hooks:

Components

vike-vue introduces the following new components:

  • ClientOnly: Wrapper to render and load a component only on the client-side.

FAQs

Package last updated on 14 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc