chore(migrate): apps/* to webpack5 (#9606)

This commit is contained in:
Igor Randjelovic
2021-12-21 18:47:33 +01:00
committed by GitHub
parent 04c0f8783d
commit a88cacab89
62 changed files with 643 additions and 404 deletions

View File

@@ -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;

View File

@@ -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);
};
};