packages/okam-core/src/helper/factory.js
function addExtension(type, extension) {
    if (!extension) {
        return;
    }

    let cache = pluginCache;
    if (process.env.APP_TYPE === 'quick') {
        cache = appGlobal.okamPluginCache;
    }

    let existedExtensions = cache.usedExtensions[type];
    /* istanbul ignore next */
    if (!existedExtensions) {
        existedExtensions = cache.usedExtensions[type] = [];
    }

    existedExtensions.push(extension);
}
function addExtension(type, extension) {
    if (!extension) {
        return;
    }

    let cache = pluginCache;
    if (process.env.APP_TYPE === 'quick') {
        cache = appGlobal.okamPluginCache;
    }

    let existedExtensions = cache.usedExtensions[type];
    /* istanbul ignore next */
    if (!existedExtensions) {
        existedExtensions = cache.usedExtensions[type] = [];
    }

    existedExtensions.push(extension);
}
Add extension

@inner
@param {string} type the extension type
@param {Object} extension the extension