Installations
npm install vite-plugin-cloudflare-worker
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
12.19.0
NPM Version
6.14.8
Score
50
Supply Chain
69.5
Quality
72.9
Maintenance
50
Vulnerability
97.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (93.98%)
JavaScript (6.02%)
Developer
alloc
Download Statistics
Total Downloads
1,514
Last Day
1
Last Week
5
Last Month
20
Last Year
244
GitHub Statistics
2 Stars
10 Commits
3 Watching
2 Branches
1 Contributors
Bundle Size
523.00 B
Minified
352.00 B
Minified + Gzipped
Package Meta Information
Latest Version
0.1.2
Package Id
vite-plugin-cloudflare-worker@0.1.2
Unpacked Size
26.92 kB
Size
8.14 kB
File Count
14
NPM Version
6.14.8
Node Version
12.19.0
Total Downloads
Cumulative downloads
Total Downloads
1,514
Last day
0%
1
Compared to previous day
Last week
25%
5
Compared to previous week
Last month
-51.2%
20
Compared to previous month
Last year
21.4%
244
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
12
Peer Dependencies
1
vite-plugin-cloudflare-worker
Generate a bundle that runs as a Cloudflare worker, then write it to disk and/or upload it directly to Cloudflare.
The bundle is minified by default.
1import workerPlugin from 'vite-plugin-cloudflare-worker' 2 3export default { 4 plugins: [ 5 // Make sure this is last. 6 workerPlugin({ 7 main: 'workers/foo.ts', 8 }), 9 ] 10}
See the 2.0
branch for Vite 2 compatible docs.
Configuration
-
main: string
The entry module in JavaScript or TypeScript. -
dest?: string
The bundle filename, relative tooutDir
in Vite config.
Defaults toworkers/[name].js
unlessupload
is defined (in which case, nothing is saved to disk whendest
is undefined). -
plugins?: RollupPlugin[]
Custom plugins to apply after the default plugins (but before minifying). -
inlineGlobs?: string | string[]
Matching files are bundled with the script. Use theserve
function (exported by this plugin) in your script to easily serve the bundled content with the proper response headers (ETag
,Content-Type
,Content-Length
). -
minify?: object | boolean
Customize how the script is minified, or passfalse
to disable minification. -
minifyHtml?: object | boolean
Customize how inlined.html
modules are minified, or passfalse
to disable. -
upload?: UploadConfig
When defined, the worker is uploaded after a successful build.
TheUploadConfig
type contains these values:scriptId: string
(any name you like)accountId: string
(found on the homepage of your Cloudflare account)authToken?: string
(defaults toprocess.env.CLOUDFLARE_AUTH_TOKEN
)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
11 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-4w2v-q235-vp99
- Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
Score
1.7
/10
Last Scanned on 2025-01-27
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 MoreGathering detailed insights and metrics for vite-plugin-cloudflare-worker