npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-sfc-vite

v0.1.1-alpha-0

Published

Vue SFC Vite is a Vue 3 SFC template for Vite

Downloads

16

Readme

Vue SFC Vite - A Vue 3 SFC Vite template

A package to create Vue 3 SFC Vite projects. Inspired by VueSFCRollup VueSFCRollup was a great package to create SFC Rollup projects. But after there deprecation of the package, we decided to create a similar package for Vite. Used Vite/Library Mode configuration to create a single file component template for Vue 3 (Supports Vue 2 as well). vue-sfc-vite is a CLI templating utility that scaffolds a minimal setup for compiling a Vue Single File Component ( SFC) - into a form ready to share via npm. It doesn't assume any particular flavor of CSS or docs generator, so you can use what you're already used to. It's the fastest way to produce npm-ready vue components!

Installation

Install globally

# Install globally (recommended)
npm install -g vue-sfc-vite
vue-sfc-vite

OR use via npx

# For immediate, no-install usage
npx vue-sfc-vite

Usage

# Fill in prompts

# Navigate to library folder
cd path/to/my-component-or-lib
npm install

## Create a SFC
vue-sfc-vite

[Note: visit here to get the installation guide for mono-repo using lerna]

SFC Options

  • Which version of Vue are you writing for?

    • [x] Vue 3
    • [ ] Vue 2
  • Is this a single component or a library?

    • [x] Single Component
  • What is the npm name of your component?

    • [x] my-component
  • What is the kebab-case tag name for your component?

    • [x] my-component
  • Will this component be written in JavaScript or TypeScript?

    • [x] TypeScript
    • [ ] JavaScript
  • Enter a location to save the component files:

    • [x] ./my-component

Add styles to your component

  • Visit my-component/src/assets/scss/my-component.scss and add your styles to the file.
    • In my-component.vue file, import the styles file as shown below:
      <style scoped lang="scss">
        @import "../assets/scss/<%= componentName %>.scss";
      </style>
      [Note: Importing styles in this way will make sure that the styles are scoped to the component. But if you import the styles in the <script lang="ts/js">...</script> tag of the SFC, then the styles might not work as expected. So, it's recommended to import the styles in the <style scoped lang="scss">...</style> tag of the SFC as shown above. Also, make sure that you have installed sass and sass-loader as dev dependencies. If not, then install them using the following command: npm install -D sass sass-loader. For more information, visit here.]

Features

  • 📦 Single File Component - Create a single file component for Vue 3.
  • 📦 Vue 2 Support - Create a single file component for Vue 2.
  • 📦 Vue 3 Support - Create a single file component for Vue 3.
  • 📦 Vue 3 Composition API - Create a single file component for Vue 3 with Composition API.
  • 📦 Vue 3 Composition API + Vue 2 Support - Create a single file component for Vue 3 with Composition API and Vue 2 Support.