Gathering detailed insights and metrics for vite-plugin-rsw
Gathering detailed insights and metrics for vite-plugin-rsw
Gathering detailed insights and metrics for vite-plugin-rsw
Gathering detailed insights and metrics for vite-plugin-rsw
npm install vite-plugin-rsw
Typescript
Module System
Node Version
NPM Version
57.4
Supply Chain
88.9
Quality
76.1
Maintenance
100
Vulnerability
98.6
License
TypeScript (100%)
Total Downloads
41,092
Last Day
4
Last Week
92
Last Month
332
Last Year
4,427
MIT License
390 Stars
152 Commits
12 Forks
1 Watchers
2 Branches
4 Contributors
Updated on Apr 07, 2025
Minified
Minified + Gzipped
Latest Version
2.0.11
Package Id
vite-plugin-rsw@2.0.11
Unpacked Size
17.85 kB
Size
6.25 kB
File Count
6
NPM Version
8.15.0
Node Version
18.7.0
Cumulative downloads
Total Downloads
Last Day
-66.7%
4
Compared to previous day
Last Week
48.4%
92
Compared to previous week
Last Month
-11.2%
332
Compared to previous month
Last Year
-57.9%
4,427
Compared to previous year
1
wasm-pack plugin for Vite
rsw version | vite version |
---|---|
>= 2.0.0 | >= 2.8.0 |
>= 1.8.0 | >= 2.4.0 |
1.7.0 | 2.0.0 ~ 2.3.8 |
HMR
Friendly error message
- browser and terminalrsw = rs(rust) → w(wasm)
- A command-line tool for automatically rebuilding local changes, based on the wasm-pack implementation.Install rsw
1cargo install rsw
Install vite-plugin-rsw
1# With NPM: 2npm i -D vite-plugin-rsw 3 4# With Yarn: 5yarn add -D vite-plugin-rsw
Edit vite.config.ts
1import { defineConfig } from 'vite'; 2import { ViteRsw } from 'vite-plugin-rsw'; 3 4export default defineConfig({ 5 plugins: [ 6 ViteRsw(), 7 ], 8})
Edit package.json
1"scripts": { 2+ "dev": "rsw watch & vite", 3+ "build": "rsw build && tsc && vite build", 4+ "rsw": "rsw" 5}
Initial rsw.toml
1# yarn rsw -h 2yarn rsw init
Generate rust crate
1# rsw.toml 2[new] 3# using: wasm-pack | rsw | user, default is `wasm-pack` 4using = "wasm-pack"
1yarn rsw new rsw-hello
Edit rsw.toml
1# link type: npm | yarn | pnpm, default is `npm` 2cli = "npm" 3 4[[crates]] 5name = "rsw-hello" 6# <npm|yarn|pnpm> link 7# ⚠️ Note: must be set to `true`, default is `false` 8link = true
Start dev server
1# rsw watch & vite 2yarn dev
Deploy
1yarn build
create-mpl - ⚡️ Create a project in seconds!
1# Quickly initialize a wasm project 2 3# npm 6.x 4npm init mpl@latest my-app --type wasm 5 6# npm 7+, extra double-dash is needed: 7npm init mpl@latest my-app -- --type wasm
群二维码已过期,关注公众号《浮之静》,发送“进群”,我将拉你进群一起学习。
MIT License © 2021 lencx
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More