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 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-vite-plugin-spfx

v0.1.0

Published

Scaffold a SharePoint Framework web part built by Vite — React, Vue, Svelte, Solid or no framework at all.

Readme

create-vite-plugin-spfx

One command to a SharePoint web part.

Scaffolds a SharePoint Framework project built by Vite — React, Vue, Svelte, Solid, or no framework at all.

npm version license


npm create vite-plugin-spfx@latest
# or
pnpm create vite-plugin-spfx

It asks three things — directory, framework, web part title — and writes a project that builds a deployable .sppkg right away:

cd my-web-part
npm install
npm run dev     # serve it to SharePoint
npm run build   # dist/ and sharepoint/solution/my-web-part.sppkg

Non-interactive

npm create vite-plugin-spfx@latest my-web-part -- --template solid --yes

| Option | | | ----------------------- | -------------------------------------------------------------------- | | [directory] | Where to write. Must be empty or missing. Defaults to my-web-part. | | -t, --template <name> | react, vanilla, solid, svelte, vue | | -y, --yes | Take every default, ask nothing | | -h, --help | Show usage | | -v, --version | Print the version |

Which template?

| | | | ----------- | ----------------------------------------------------------------------------------------- | | react | Smallest bundle — SharePoint serves React itself, so it is referenced rather than bundled | | vanilla | No framework at all. SharePoint only asks for a class that renders into a DOM element | | solid | Fine-grained reactivity, compiles JSX to direct DOM calls | | svelte | Compiles away, contributes a small runtime | | vue | Full renderer, largest of the five |

All five build the same web part — property pane, localization in two locales, a runtime-resolved asset, theming, and component state that survives a re-render. They differ only in the component file and in how props are updated.

What you get

Everything is named after your web part, so there is nothing to rename before you start. For the title Team Roster:

team-roster/
├─ config/
│  ├─ package-solution.json      what the .sppkg contains
│  └─ serve.json                 port and workbench URL
├─ src/webparts/teamRoster/
│  ├─ TeamRosterWebPart.ts       the web part class
│  ├─ TeamRosterWebPart.manifest.json
│  ├─ TeamRoster.vue             the component
│  ├─ loc/                       en-us and de-de
│  └─ assets/
├─ package.json
├─ tsconfig.json
└─ vite.config.mjs

| Derived from the title | | | ------------------------ | -------------------------- | | Folder | src/webparts/teamRoster/ | | Class and manifest alias | TeamRosterWebPart | | Component | TeamRoster | | Strings specifier | TeamRosterWebPartStrings | | Bundle | team-roster-web-part.js |

Those five have to agree with each other, and SharePoint only complains at runtime when they do not — which is exactly why the scaffolder does it rather than leaving you a sample to rename.

Fresh GUIDs are generated for the component, the solution and the feature on every scaffold — reusing them would make SharePoint treat two different web parts as the same component.

The generated README covers the two things the dev server needs from you: your tenant domain in .env.local, and a trusted development certificate.

Requirements

Node ≥ 22.12. A SharePoint tenant is only needed to run what you built, not to build it.

Documentation

The plugin doing the actual work is vite-plugin-spfx — options, theming, localization, dev server, packaging, and how to migrate an existing SPFx project.

License

MIT