mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore(migrate): apps/* to webpack5 (#9606)
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
// todo: figure out why this worker is including the whole core and not just the Http module
|
||||
// ie. tree-shaking is not working as expected here. (same setup works in a separate app)
|
||||
import { initGlobal } from '@nativescript/core/globals/index';
|
||||
initGlobal();
|
||||
|
||||
import { Http } from '@nativescript/core';
|
||||
|
||||
declare var postMessage: any;
|
||||
|
||||
@@ -689,15 +689,14 @@ export var test_request_jsonAsContentSentAndReceivedProperly = function (done) {
|
||||
};
|
||||
|
||||
export var test_getString_WorksProperlyInWorker = function (done) {
|
||||
const HttpStringWorker = require('nativescript-worker-loader!./http-string-worker');
|
||||
let worker = new HttpStringWorker();
|
||||
const worker = new Worker('./http-string-worker');
|
||||
console.log('Worker Created');
|
||||
worker.onmessage = function (msg) {
|
||||
console.log('Message received');
|
||||
done();
|
||||
};
|
||||
worker.onerror = function (e) {
|
||||
console.log('error received');
|
||||
console.log('Error received');
|
||||
done(e);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user