Updates #2350 Avoid bundling Strophe twice

by not importing Strophe outside of @converse/headless
This commit is contained in:
JC Brand 2020-12-10 16:32:01 +01:00
parent 4ece50d07c
commit c855d2f4ce
6 changed files with 5 additions and 10 deletions

View File

@ -4,7 +4,6 @@
* @license Mozilla Public License (MPLv2)
*/
import './polyfill';
import 'strophe.js/src/websocket';
import Storage from '@converse/skeletor/src/storage.js';
import advancedFormat from 'dayjs/plugin/advancedFormat';
import dayjs from 'dayjs';

View File

@ -1,7 +1,7 @@
import log from "../log.js";
import sizzle from 'sizzle';
import u from '@converse/headless/utils/core';
import { Strophe } from 'strophe.js/src/core';
import { Strophe } from 'strophe.js/src/strophe';
import { _converse, api, clearSession, tearDown } from "../core.js";
import { debounce, isElement } from 'lodash';

View File

@ -3,14 +3,12 @@
* @license Mozilla Public License (MPLv2)
* @description This is the core utilities module.
*/
import * as strophe from 'strophe.js/src/core';
import { Strophe } from 'strophe.js/src/strophe';
import { Model } from '@converse/skeletor/src/model.js';
import { compact, last, isElement, isObject } from "lodash-es";
import log from "@converse/headless/log";
import sizzle from "sizzle";
const Strophe = strophe.default.Strophe;
/**
* The utils object
* @namespace u

View File

@ -1,12 +1,10 @@
import * as strophe from 'strophe.js/src/core';
import { Strophe, $msg } from 'strophe.js/src/strophe';
import dayjs from 'dayjs';
import sizzle from 'sizzle';
import u from '@converse/headless/utils/core';
import log from "../log";
import { _converse, api } from "@converse/headless/core";
const Strophe = strophe.default.Strophe;
const $msg = strophe.default.$msg;
const { NS } = Strophe;

View File

@ -1,10 +1,10 @@
import tpl_add_muc from "./templates/add-muc.js";
import BootstrapModal from "./base.js";
import { Strophe } from 'strophe.js/src/strophe';
import { __ } from '../i18n';
import { _converse, api, converse } from "@converse/headless/core";
const u = converse.env.utils;
const { Strophe } = converse.env;
export default BootstrapModal.extend({

View File

@ -5,11 +5,11 @@ import st from "@converse/headless/utils/stanza";
import tpl_list_chatrooms_modal from "./templates/muc-list.js";
import tpl_room_description from "templates/room_description.html";
import tpl_spinner from "templates/spinner.js";
import { Strophe, $iq } from 'strophe.js/src/strophe';
import { __ } from '../i18n';
import { _converse, api, converse } from "@converse/headless/core";
import { head } from "lodash-es";
const { Strophe, $iq } = converse.env;
const u = converse.env.utils;