"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_extra_1 = require("fs-extra");
const build_1 = require("../build");
(() => __awaiter(void 0, void 0, void 0, function* () {
    var _a;
    const result = yield (0, build_1.build)({
        minify: true,
        sourcemap: false,
        bundle: true,
        logLevel: 'warning',
        entryPoints: ['src/client/platform/web/index.ts'],
        define: {
            'globalThis.env': '{"NODE_ENV": "production"}',
        },
        outfile: 'public/index.js',
        metafile: true,
    });
    yield (0, fs_extra_1.writeFile)('public/build.json', JSON.stringify((_a = result.metafile) !== null && _a !== void 0 ? _a : {}));
    yield (0, fs_extra_1.copy)('public/index.js', 'build/web.js');
}))();
exports.default = null;
//# sourceMappingURL=client.js.map