We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 049f4c2 commit 35622deCopy full SHA for 35622de
2 files changed
src/html/VirtualHtmlPlugin.ts
@@ -13,9 +13,11 @@ export const VirtualHtmlPlugin = (
13
return {
14
name: "vite-plugin-virtual-html",
15
async config(config: UserConfig, { command }: ConfigEnv) {
16
- config.appType = "custom";
17
_config = config;
18
if (command === "serve") {
+ if (_htmlOptions.useCustom) {
19
+ config.appType = "custom";
20
+ }
21
_instance = new Serve(_htmlOptions);
22
} else if (command === "build") {
23
_instance = new Build(_htmlOptions);
src/html/types.ts
@@ -66,7 +66,10 @@ export type HtmlPluginOptions = {
66
* key: html name, can be *
67
*/
68
injectCode?: Record<string, InjectCode>
69
-
+ /**
70
+ * is set appType to custom?
71
+ */
72
+ useCustom?: boolean
73
}
74
75
/**
0 commit comments