File tree 2 files changed +21
-10
lines changed
2 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -662,6 +662,14 @@ createServer()
662
662
663
663
当设置为 ` true ` ,构建后将会生成 ` manifest.json ` 文件,包含了没有被 hash 的资源文件名和 hash 后版本的映射。可以为一些服务器框架渲染时提供正确的资源引入链接。
664
664
665
+ ### build.ssrManifest {#build-ssrmanifest}
666
+
667
+ - ** 类型:** ` boolean `
668
+ - ** 默认值:** ` false `
669
+ - ** 相关链接:** [ Server-Side Rendering] ( /guide/ssr )
670
+
671
+ 当设置为 ` true ` 时,构建也将生成 SSR 的 manifest 文件,以确定生产中的样式链接与资产预加载指令。
672
+
665
673
### build.minify {#build-minify}
666
674
667
675
- ** 类型:** ` boolean | 'terser' | 'esbuild' `
Original file line number Diff line number Diff line change @@ -85,16 +85,6 @@ interface ViteDevServer {
85
85
* 应用 Vite 内建 HTML 转换和任意插件 HTML 转换
86
86
*/
87
87
transformIndexHtml(url: string, html: string): Promise<string>
88
- /**
89
- * 使用 esbuild 转换一个文件的工具函数
90
- * 对某些特定插件十分有用
91
- */
92
- transformWithEsbuild(
93
- code: string,
94
- filename: string,
95
- options?: EsbuildTransformOptions,
96
- inMap?: object
97
- ): Promise<ESBuildTransformResult>
98
88
/**
99
89
* 加载一个给定的 URL 作为 SSR 的实例化模块
100
90
*/
@@ -157,3 +147,16 @@ async function resolveConfig(
157
147
defaultMode?: string
158
148
): Promise<ResolvedConfig>
159
149
` ` `
150
+
151
+ ## ` transformWithEsbuild `
152
+
153
+ ** 类型签名:**
154
+
155
+ ` ` ` ts
156
+ async function transformWithEsbuild(
157
+ code: string,
158
+ filename: string,
159
+ options?: EsbuildTransformOptions,
160
+ inMap?: object
161
+ ): Promise<ESBuildTransformResult>
162
+ ` ` `
You can’t perform that action at this time.
0 commit comments