"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updatePolyfills = void 0;
const core_1 = require("@angular-devkit/core");
const updatePolyfills = (tree, _options) => {
    if (_options.alreadyInstalled == false) {
        const pathString = (0, core_1.normalize)(`/${_options.sourceRoot}/polyfills.ts`);
        const currentPolyfills = tree.read(pathString);
        tree.overwrite(pathString, currentPolyfills + `
    (window as any).global = window;
    global.Buffer = global.Buffer || require('buffer').Buffer;
    global.process = require('process');`);
    }
    return tree;
};
exports.updatePolyfills = updatePolyfills;
//# sourceMappingURL=updatePolyfills.js.map