Use dedicated indexeddb worker import

pull/3578/head
David Baker 2017-04-07 14:41:41 +01:00
parent 515b57ba12
commit b65466bc4f
1 changed files with 1 additions and 6 deletions

View File

@ -14,12 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// The prescribed way of doing this import would be:
//import {IndexedDbStoreWorker} from 'matrix-js-sdk';
// However, this still pulls in all of the js-sdk and we only use a tiny fraction
// of it. It also causes an Olm error to appear because we don't have an Olm in scope.
// Instead, we do this:
import IndexedDBStoreWorker from 'matrix-js-sdk/lib/store/indexeddb-store-worker';
import {IndexedDBStoreWorker} from 'matrix-js-sdk/lib/indexeddb-worker.js';
const remoteWorker = new IndexedDBStoreWorker(postMessage);