solid-register
Version:
integrated package to run solid browser code in node
13 lines (12 loc) • 506 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const read_config_1 = require("./read-config");
const happy_dom_1 = require("happy-dom");
const url = typeof read_config_1.config.dom === 'object' && read_config_1.config.dom.url || 'https://localhost:3000';
const window = new happy_dom_1.Window();
window.location.href = url;
for (const key of Object.keys(window)) {
if (globalThis[key] === undefined && key !== 'undefined') {
globalThis[key] = window[key];
}
}