@cloudflare/vite-plugin 0.0.0-229d00fce → 0.0.0-29f2076a6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -23
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -16,32 +16,13 @@ Your Worker code runs inside [workerd](https://github.com/cloudflare/workerd), m
|
|
|
16
16
|
|
|
17
17
|
## Quick start
|
|
18
18
|
|
|
19
|
-
### Start with a basic `package.json`
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{
|
|
23
|
-
"name": "cloudflare-vite-quick-start",
|
|
24
|
-
"private": true,
|
|
25
|
-
"version": "0.0.0",
|
|
26
|
-
"type": "module",
|
|
27
|
-
"scripts": {
|
|
28
|
-
"dev": "vite",
|
|
29
|
-
"build": "vite build",
|
|
30
|
-
"preview": "vite preview"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
> [!NOTE]
|
|
36
|
-
> Ensure that you include `"type": "module"` in order to use ES modules by default.
|
|
37
|
-
|
|
38
19
|
### Install the dependencies
|
|
39
20
|
|
|
40
21
|
```sh
|
|
41
|
-
npm install
|
|
22
|
+
npm install @cloudflare/vite-plugin wrangler --save-dev
|
|
42
23
|
```
|
|
43
24
|
|
|
44
|
-
###
|
|
25
|
+
### Add the plugin to your Vite config
|
|
45
26
|
|
|
46
27
|
```ts
|
|
47
28
|
// vite.config.ts
|
|
@@ -59,7 +40,7 @@ export default defineConfig({
|
|
|
59
40
|
```toml
|
|
60
41
|
# wrangler.toml
|
|
61
42
|
|
|
62
|
-
name = "
|
|
43
|
+
name = "my-worker"
|
|
63
44
|
compatibility_date = "2024-12-30"
|
|
64
45
|
main = "./src/index.ts"
|
|
65
46
|
```
|
|
@@ -76,7 +57,7 @@ export default {
|
|
|
76
57
|
};
|
|
77
58
|
```
|
|
78
59
|
|
|
79
|
-
You can now develop (`
|
|
60
|
+
You can now develop (`vite dev`), build (`vite build`), preview (`vite preview`), and deploy (`wrangler deploy`) your application.
|
|
80
61
|
|
|
81
62
|
## Tutorial
|
|
82
63
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-29f2076a6",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@hattip/adapter-node": "^0.0.49",
|
|
37
37
|
"unenv": "npm:unenv-nightly@2.0.0-20241218-183400-5d6aec3",
|
|
38
38
|
"ws": "^8.18.0",
|
|
39
|
-
"miniflare": "0.0.0-
|
|
39
|
+
"miniflare": "0.0.0-29f2076a6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@cloudflare/workers-types": "^4.20241230.0",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"tsup": "^8.3.0",
|
|
47
47
|
"typescript": "^5.7.2",
|
|
48
48
|
"vite": "^6.0.7",
|
|
49
|
-
"@cloudflare/workers-
|
|
50
|
-
"wrangler": "0.0.0-
|
|
51
|
-
"@cloudflare/workers-
|
|
49
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
50
|
+
"wrangler": "0.0.0-29f2076a6",
|
|
51
|
+
"@cloudflare/workers-shared": "0.0.0-29f2076a6"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"vite": "^6.0.7",
|