@kimesh/kit 0.2.13 → 0.2.14-nightly.20260127042859
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.mjs +53 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -3047,7 +3047,59 @@ export default createMiddlewarePlugin({
|
|
|
3047
3047
|
server.watcher.on("unlink", handleWatchEvent("unlink"));
|
|
3048
3048
|
server.middlewares.use(async (req, res, next) => {
|
|
3049
3049
|
const url = req.url || "/";
|
|
3050
|
-
|
|
3050
|
+
const pathname = url.split("?")[0];
|
|
3051
|
+
if (url.startsWith("/@") || url.startsWith("/__") || url.startsWith("/node_modules") || pathname.startsWith("/.")) return next();
|
|
3052
|
+
if (!(req.headers.accept || "").includes("text/html")) return next();
|
|
3053
|
+
const extMatch = (pathname.split("/").pop() || "").match(/\.([a-zA-Z0-9]+)$/);
|
|
3054
|
+
if (extMatch) {
|
|
3055
|
+
const ext = extMatch[1].toLowerCase();
|
|
3056
|
+
if ([
|
|
3057
|
+
"js",
|
|
3058
|
+
"mjs",
|
|
3059
|
+
"cjs",
|
|
3060
|
+
"ts",
|
|
3061
|
+
"mts",
|
|
3062
|
+
"cts",
|
|
3063
|
+
"jsx",
|
|
3064
|
+
"tsx",
|
|
3065
|
+
"css",
|
|
3066
|
+
"scss",
|
|
3067
|
+
"sass",
|
|
3068
|
+
"less",
|
|
3069
|
+
"styl",
|
|
3070
|
+
"json",
|
|
3071
|
+
"xml",
|
|
3072
|
+
"yaml",
|
|
3073
|
+
"yml",
|
|
3074
|
+
"toml",
|
|
3075
|
+
"html",
|
|
3076
|
+
"htm",
|
|
3077
|
+
"png",
|
|
3078
|
+
"jpg",
|
|
3079
|
+
"jpeg",
|
|
3080
|
+
"gif",
|
|
3081
|
+
"svg",
|
|
3082
|
+
"ico",
|
|
3083
|
+
"webp",
|
|
3084
|
+
"avif",
|
|
3085
|
+
"woff",
|
|
3086
|
+
"woff2",
|
|
3087
|
+
"ttf",
|
|
3088
|
+
"eot",
|
|
3089
|
+
"otf",
|
|
3090
|
+
"mp3",
|
|
3091
|
+
"mp4",
|
|
3092
|
+
"webm",
|
|
3093
|
+
"ogg",
|
|
3094
|
+
"wav",
|
|
3095
|
+
"pdf",
|
|
3096
|
+
"zip",
|
|
3097
|
+
"tar",
|
|
3098
|
+
"gz",
|
|
3099
|
+
"map",
|
|
3100
|
+
"wasm"
|
|
3101
|
+
].includes(ext)) return next();
|
|
3102
|
+
}
|
|
3051
3103
|
try {
|
|
3052
3104
|
const html = readFileSync(join$1(state.generatedDir, "index.html"), "utf-8");
|
|
3053
3105
|
const transformed = await server.transformIndexHtml(url, html);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimesh/kit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14-nightly.20260127042859",
|
|
4
4
|
"description": "Build-time engine for Kimesh framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"test:watch": "vitest"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@kimesh/auto-import": "
|
|
31
|
-
"@kimesh/layers": "
|
|
32
|
-
"@kimesh/router-generator": "
|
|
30
|
+
"@kimesh/auto-import": "workspace:*",
|
|
31
|
+
"@kimesh/layers": "workspace:*",
|
|
32
|
+
"@kimesh/router-generator": "workspace:*",
|
|
33
33
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
34
34
|
"c12": "^3.3.3",
|
|
35
35
|
"consola": "^3.4.2",
|