Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vitejs/plugin-vue

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitejs/plugin-vue

Note: requires `@vue/compiler-sfc` as peer dependency. This is largely a port of `rollup-plugin-vue` with some vite-specific tweaks.

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
decreased by-42.6%
Maintainers
1
Weekly downloads
 
Created

What is @vitejs/plugin-vue?

The @vitejs/plugin-vue package is a plugin for Vite, a modern frontend build tool, that enables Vue.js single-file component (SFC) support. It allows developers to use Vue 3 features within Vite projects, including template compilation, hot module replacement (HMR), and more.

What are @vitejs/plugin-vue's main functionalities?

Single-File Component Support

Enables the use of Vue.js single-file components (.vue files) by handling their parsing and compilation.

import { createApp } from 'vue';
import App from './App.vue';

const app = createApp(App);
app.mount('#app');

Hot Module Replacement

Supports HMR for Vue components, allowing for a more efficient development experience by enabling instant feedback on code changes without a full page reload.

if (import.meta.hot) {
  import.meta.hot.accept('./some-module.js', (newModule) => {
    // Handle the module update
  });
}

Template Compilation

Compiles Vue component templates into render functions, improving performance and enabling the use of Vue's template syntax.

<template>
  <div>{{ message }}</div>
</template>

<script>
export default {
  data() {
    return {
      message: 'Hello, world!'
    };
  }
};
</script>

Other packages similar to @vitejs/plugin-vue

FAQs

Package last updated on 30 Dec 2020

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