"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const emscripten_wasm_loader_1 = require("emscripten-wasm-loader");
const sassLoader_1 = require("./sassLoader");
const logger_1 = require("./util/logger");
/**
 * Load, initialize wasm binary to use actual sass instance.
 *
 * @returns {Promise<SassFactory>} Function to load module
 */
const loadModule = async () => {
    logger_1.log(`loadModule: loading libsass module`);
    //imports MODULARIZED emscripten preamble
    const runtimeModule = await Promise.resolve().then(() => require('./bin/libsass'));
    const moduleLoader = await emscripten_wasm_loader_1.getModuleLoader(sassLoader_1.sassLoader, runtimeModule);
    return moduleLoader();
};
exports.loadModule = loadModule;
//# sourceMappingURL=loadModule.js.map