"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const lowcode_code_generator_1 = require("@alilc/lowcode-code-generator");
const pluginFactory = () => {
    const plugin = (pre) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
        var _a;
        const next = Object.assign({}, pre);
        const ir = next.ir;
        next.chunks.push({
            type: lowcode_code_generator_1.ChunkType.STRING,
            fileType: lowcode_code_generator_1.FileType.HTML,
            name: lowcode_code_generator_1.COMMON_CHUNK_NAME.HtmlContent,
            content: `
        <!DOCTYPE html>
        <html lang="en">
          <head>
            <meta charset="UTF-8">
            <link rel="icon" href="/favicon.ico">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>${((_a = ir === null || ir === void 0 ? void 0 : ir.meta) === null || _a === void 0 ? void 0 : _a.name) || 'Vite App'}</title>
          </head>
          <body>
            <div id="app"></div>
            <script type="module" src="/src/main.js"></script>
          </body>
        </html>
      `,
            linkAfter: [],
        });
        return next;
    });
    return plugin;
};
exports.default = pluginFactory;
//# sourceMappingURL=entryHtml.js.map