Socket
Socket
Sign inDemoInstall

@vitejs/plugin-vue

Package Overview
Dependencies
Maintainers
5
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitejs/plugin-vue

> Note: as of `vue` 3.2.13+ and `@vitejs/plugin-vue` 1.9.0+, `@vue/compiler-sfc` is no longer required as a peer dependency.


Version published
Weekly downloads
2M
decreased by-2.09%
Maintainers
5
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 12 Aug 2022

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