@hono/vite-build 1.0.0 → 1.1.0
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/adapter/deno/index.d.ts +10 -0
- package/dist/adapter/deno/index.js +26 -0
- package/dist/index.js +1 -2
- package/package.json +5 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
import { BuildOptions } from '../../base.js';
|
|
3
|
+
import '../../entry/index.js';
|
|
4
|
+
|
|
5
|
+
type DenoBuildOptions = {
|
|
6
|
+
staticRoot?: string | undefined;
|
|
7
|
+
} & BuildOptions;
|
|
8
|
+
declare const denoBuildPlugin: (pluginOptions?: DenoBuildOptions) => Plugin;
|
|
9
|
+
|
|
10
|
+
export { DenoBuildOptions, denoBuildPlugin as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import buildPlugin from "../../base.js";
|
|
2
|
+
import { serveStaticHook } from "../../entry/serve-static.js";
|
|
3
|
+
const denoBuildPlugin = (pluginOptions) => {
|
|
4
|
+
return {
|
|
5
|
+
...buildPlugin({
|
|
6
|
+
...{
|
|
7
|
+
entryContentBeforeHooks: [
|
|
8
|
+
async (appName, options) => {
|
|
9
|
+
let code = "import { serveStatic } from 'hono/deno'\n";
|
|
10
|
+
code += serveStaticHook(appName, {
|
|
11
|
+
filePaths: options?.staticPaths,
|
|
12
|
+
root: pluginOptions?.staticRoot
|
|
13
|
+
});
|
|
14
|
+
return code;
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
...pluginOptions
|
|
19
|
+
}),
|
|
20
|
+
name: "@hono/vite-build/deno"
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
var deno_default = denoBuildPlugin;
|
|
24
|
+
export {
|
|
25
|
+
deno_default as default
|
|
26
|
+
};
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hono/vite-build",
|
|
3
3
|
"description": "Vite plugin to build your Hono app",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"type": "module",
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"./cloudflare-workers": {
|
|
36
36
|
"types": "./dist/adapter/cloudflare-workers/index.d.ts",
|
|
37
37
|
"import": "./dist/adapter/cloudflare-workers/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./deno": {
|
|
40
|
+
"types": "./dist/adapter/deno/index.d.ts",
|
|
41
|
+
"import": "./dist/adapter/deno/index.js"
|
|
38
42
|
}
|
|
39
43
|
},
|
|
40
44
|
"typesVersions": {
|