@cloudflare/vite-plugin 1.0.1 → 1.0.3
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/dist/index.js +13 -0
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -490,6 +490,7 @@ import * as fs5 from "node:fs";
|
|
|
490
490
|
import * as fsp2 from "node:fs/promises";
|
|
491
491
|
import * as path9 from "node:path";
|
|
492
492
|
import { createMiddleware } from "@hattip/adapter-node";
|
|
493
|
+
import replace from "@rollup/plugin-replace";
|
|
493
494
|
|
|
494
495
|
// ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
495
496
|
var comma = ",".charCodeAt(0);
|
|
@@ -14598,6 +14599,18 @@ function cloudflare2(pluginConfig = {}) {
|
|
|
14598
14599
|
configEnvironment(name) {
|
|
14599
14600
|
if (isNodeCompat(getWorkerConfig2(name))) {
|
|
14600
14601
|
return {
|
|
14602
|
+
build: {
|
|
14603
|
+
rollupOptions: {
|
|
14604
|
+
plugins: [
|
|
14605
|
+
replace({
|
|
14606
|
+
"process.env.NODE_ENV": JSON.stringify(
|
|
14607
|
+
process.env.NODE_ENV ?? "production"
|
|
14608
|
+
),
|
|
14609
|
+
preventAssignment: true
|
|
14610
|
+
})
|
|
14611
|
+
]
|
|
14612
|
+
}
|
|
14613
|
+
},
|
|
14601
14614
|
resolve: {
|
|
14602
14615
|
builtins: [...nodeCompatExternals]
|
|
14603
14616
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -34,17 +34,18 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@hattip/adapter-node": "^0.0.49",
|
|
37
|
+
"@rollup/plugin-replace": "^6.0.1",
|
|
37
38
|
"get-port": "^7.1.0",
|
|
38
39
|
"picocolors": "^1.1.1",
|
|
39
40
|
"tinyglobby": "^0.2.12",
|
|
40
41
|
"unenv": "2.0.0-rc.15",
|
|
41
42
|
"ws": "8.18.0",
|
|
43
|
+
"miniflare": "4.20250408.0",
|
|
42
44
|
"@cloudflare/unenv-preset": "2.3.1",
|
|
43
|
-
"
|
|
44
|
-
"wrangler": "4.8.0"
|
|
45
|
+
"wrangler": "4.9.1"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@cloudflare/workers-types": "^4.
|
|
48
|
+
"@cloudflare/workers-types": "^4.20250408.0",
|
|
48
49
|
"@types/node": "^22.10.1",
|
|
49
50
|
"@types/ws": "^8.5.13",
|
|
50
51
|
"magic-string": "^0.30.12",
|