"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const esbuild_1 = require("esbuild");
const fs_extra_1 = require("fs-extra");
const path = require("path");
const path_1 = require("../../../path");
(0, esbuild_1.buildSync)({
    minify: false,
    sourcemap: true,
    bundle: true,
    logLevel: 'warning',
    entryPoints: ['./src/client/html/meta.ts'],
    define: {
        'globalThis.env': '{"NODE_ENV": "production"}',
    },
    outfile: 'public/_meta.js',
});
const buffer = (0, fs_extra_1.readFileSync)(path.join(path_1.PATH_PUBLIC, '_meta.js'));
const INDEX_JS = buffer.toString();
const INDEX_TS = `export const INDEX_JS = \"${INDEX_JS.replace(/\\/g, '\\\\').replace(/\n/g, '\\n').replace(/"/g, '\\"')}\"`;
(0, fs_extra_1.outputFileSync)(path.join(path_1.PATH_SRC_CLIENT, 'static/js/index.js.ts'), INDEX_TS);
//# sourceMappingURL=client.js.map