@cloudflare/vite-plugin 1.11.6 → 1.11.7
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/asset-workers/asset-worker.js +15 -4
- package/dist/index.js +5 -0
- package/package.json +6 -6
|
@@ -4952,10 +4952,21 @@ var staticRedirectsMatcher = (configuration, host, pathname) => {
|
|
|
4952
4952
|
};
|
|
4953
4953
|
var generateRedirectsMatcher = (configuration) => generateRulesMatcher(
|
|
4954
4954
|
configuration.redirects.version === REDIRECTS_VERSION ? configuration.redirects.rules : {},
|
|
4955
|
-
({ status, to }, replacements) =>
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4955
|
+
({ status, to }, replacements) => {
|
|
4956
|
+
const target = replacer(to, replacements).trim();
|
|
4957
|
+
const protoPattern = /^(\w+:\/\/)/;
|
|
4958
|
+
if (protoPattern.test(target)) {
|
|
4959
|
+
return {
|
|
4960
|
+
status,
|
|
4961
|
+
to: target
|
|
4962
|
+
};
|
|
4963
|
+
} else {
|
|
4964
|
+
return {
|
|
4965
|
+
status,
|
|
4966
|
+
to: target.replace(/\/+/g, "/")
|
|
4967
|
+
};
|
|
4968
|
+
}
|
|
4969
|
+
}
|
|
4959
4970
|
);
|
|
4960
4971
|
|
|
4961
4972
|
// ../workers-shared/asset-worker/src/utils/headers.ts
|
package/dist/index.js
CHANGED
|
@@ -16139,6 +16139,11 @@ function cloudflare(pluginConfig = {}) {
|
|
|
16139
16139
|
client: {
|
|
16140
16140
|
build: {
|
|
16141
16141
|
outDir: getOutputDirectory(userConfig, "client")
|
|
16142
|
+
},
|
|
16143
|
+
optimizeDeps: {
|
|
16144
|
+
// Some frameworks allow users to mix client and server code in the same file and then extract the server code.
|
|
16145
|
+
// As the dependency optimization may happen before the server code is extracted, we should exclude Cloudflare built-ins from client optimization.
|
|
16146
|
+
exclude: [...cloudflareBuiltInModules]
|
|
16142
16147
|
}
|
|
16143
16148
|
}
|
|
16144
16149
|
} : void 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.7",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"unenv": "2.0.0-rc.19",
|
|
42
42
|
"ws": "8.18.0",
|
|
43
43
|
"@cloudflare/unenv-preset": "2.6.2",
|
|
44
|
-
"wrangler": "4.
|
|
45
|
-
"miniflare": "4.20250816.
|
|
44
|
+
"wrangler": "4.32.0",
|
|
45
|
+
"miniflare": "4.20250816.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@cloudflare/workers-types": "^4.20250816.0",
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
"typescript": "^5.8.3",
|
|
55
55
|
"vite": "7.0.0",
|
|
56
56
|
"vitest": "~3.2.0",
|
|
57
|
-
"@cloudflare/containers-shared": "0.2.10",
|
|
58
57
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
59
|
-
"@cloudflare/
|
|
58
|
+
"@cloudflare/containers-shared": "0.2.10",
|
|
59
|
+
"@cloudflare/workers-shared": "0.18.6",
|
|
60
60
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"vite": "^6.1.0 || ^7.0.0",
|
|
64
|
-
"wrangler": "^4.
|
|
64
|
+
"wrangler": "^4.32.0"
|
|
65
65
|
},
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|