Skip to content

Commit a88caca

Browse files
authored
chore(migrate): apps/* to webpack5 (NativeScript#9606)
1 parent 04c0f87 commit a88caca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+665
-426
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
**/package-lock.json
1111
**/yarn.lock
1212
**/pnpm-lock.yaml
13+
.npmrc
1314

1415
# IDEs and editors
1516
.idea

apps/automated/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
!webpack.custom.config.js
1+
!webpack.config.js

apps/automated/nativescript.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ import { NativeScriptConfig } from '@nativescript/core';
22

33
export default {
44
id: 'org.nativescript.UnitTestApp',
5+
appPath: 'src',
56
appResourcesPath: '../../tools/assets/App_Resources',
6-
webpackConfigPath: 'webpack.custom.config.js',
77
android: {
88
v8Flags: '--expose_gc',
9-
markingMode: 'none',
109
},
1110
} as NativeScriptConfig;

apps/automated/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"main": "main.js",
2+
"main": "src/main.ts",
33
"description": "NativeScript Application",
44
"license": "MIT",
55
"repository": {

apps/automated/src/app.css

Whitespace-only changes.

apps/automated/src/http/http-string-worker.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// todo: figure out why this worker is including the whole core and not just the Http module
2+
// ie. tree-shaking is not working as expected here. (same setup works in a separate app)
3+
import { initGlobal } from '@nativescript/core/globals/index';
4+
initGlobal();
5+
16
import { Http } from '@nativescript/core';
27

38
declare var postMessage: any;

apps/automated/src/http/http-tests.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,15 +689,14 @@ export var test_request_jsonAsContentSentAndReceivedProperly = function (done) {
689689
};
690690

691691
export var test_getString_WorksProperlyInWorker = function (done) {
692-
const HttpStringWorker = require('nativescript-worker-loader!./http-string-worker');
693-
let worker = new HttpStringWorker();
692+
const worker = new Worker('./http-string-worker');
694693
console.log('Worker Created');
695694
worker.onmessage = function (msg) {
696695
console.log('Message received');
697696
done();
698697
};
699698
worker.onerror = function (e) {
700-
console.log('error received');
699+
console.log('Error received');
701700
done(e);
702701
};
703702
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
other.xml
1+
<!-- other.xml -->
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
test.minWH300.xml
1+
<!-- test.minWH300.xml -->
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
test.monWH450.xml
1+
<!-- test.monWH450.xml -->

0 commit comments

Comments
 (0)