Skip to content

Commit 5ff85bf

Browse files
rigor789NathanWalker
authored andcommitted
fix: include bundle-entry-points by default
1 parent 8bc4878 commit 5ff85bf

File tree

12 files changed

+55
-31
lines changed

12 files changed

+55
-31
lines changed

packages/webpack5/__tests__/configuration/__snapshots__/angular.spec.ts.snap

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ exports[`angular configuration for android 1`] = `
312312
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
313313
__CSS_PARSER__: '\\"css-tree\\"',
314314
__UI_USE_XML_PARSER__: true,
315-
__UI_USE_EXTERNAL_RENDERER__: true,
315+
__UI_USE_EXTERNAL_RENDERER__: false,
316316
__ANDROID__: true,
317317
__IOS__: false,
318318
'global.isAndroid': true,
@@ -379,6 +379,7 @@ exports[`angular configuration for android 1`] = `
379379
entry: {
380380
bundle: [
381381
'@nativescript/core/globals/index.js',
382+
'@nativescript/core/bundle-entry-points.js',
382383
'__jest__/src/app.js',
383384
'@nativescript/core/ui/frame',
384385
'@nativescript/core/ui/frame/activity'
@@ -699,7 +700,7 @@ exports[`angular configuration for ios 1`] = `
699700
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
700701
__CSS_PARSER__: '\\"css-tree\\"',
701702
__UI_USE_XML_PARSER__: true,
702-
__UI_USE_EXTERNAL_RENDERER__: true,
703+
__UI_USE_EXTERNAL_RENDERER__: false,
703704
__ANDROID__: false,
704705
__IOS__: true,
705706
'global.isAndroid': false,
@@ -766,6 +767,7 @@ exports[`angular configuration for ios 1`] = `
766767
entry: {
767768
bundle: [
768769
'@nativescript/core/globals/index.js',
770+
'@nativescript/core/bundle-entry-points.js',
769771
'__jest__/src/app.js'
770772
],
771773
'tns_modules/inspector_modules': [
@@ -778,6 +780,7 @@ exports[`angular configuration for ios 1`] = `
778780
exports[`angular configuration loads polyfills.android.ts into the bundle entry if it exists 1`] = `
779781
Array [
780782
"__jest__/src/polyfills.android.ts",
783+
"@nativescript/core/bundle-entry-points.js",
781784
"__jest__/src/app.js",
782785
"@nativescript/core/ui/frame",
783786
"@nativescript/core/ui/frame/activity",
@@ -787,13 +790,15 @@ Array [
787790
exports[`angular configuration loads polyfills.ios.ts into the bundle entry if it exists 1`] = `
788791
Array [
789792
"__jest__/src/polyfills.ios.ts",
793+
"@nativescript/core/bundle-entry-points.js",
790794
"__jest__/src/app.js",
791795
]
792796
`;
793797

794798
exports[`angular configuration loads polyfills.ts into the bundle entry if it exists 1`] = `
795799
Array [
796800
"__jest__/src/polyfills.ts",
801+
"@nativescript/core/bundle-entry-points.js",
797802
"__jest__/src/app.js",
798803
]
799804
`;

packages/webpack5/__tests__/configuration/__snapshots__/base.spec.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ exports[`base configuration for android 1`] = `
302302
entry: {
303303
bundle: [
304304
'@nativescript/core/globals/index.js',
305+
'@nativescript/core/bundle-entry-points.js',
305306
'__jest__/src/app.js',
306307
'@nativescript/core/ui/frame',
307308
'@nativescript/core/ui/frame/activity'
@@ -612,6 +613,7 @@ exports[`base configuration for ios 1`] = `
612613
entry: {
613614
bundle: [
614615
'@nativescript/core/globals/index.js',
616+
'@nativescript/core/bundle-entry-points.js',
615617
'__jest__/src/app.js'
616618
],
617619
'tns_modules/inspector_modules': [

packages/webpack5/__tests__/configuration/__snapshots__/javascript.spec.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ exports[`javascript configuration for android 1`] = `
324324
bundle: [
325325
'@nativescript/core/globals/index.js',
326326
'__jest__/src/__@nativescript_webpack_virtual_entry_javascript__',
327+
'@nativescript/core/bundle-entry-points.js',
327328
'__jest__/src/app.js',
328329
'@nativescript/core/ui/frame',
329330
'@nativescript/core/ui/frame/activity'
@@ -656,6 +657,7 @@ exports[`javascript configuration for ios 1`] = `
656657
bundle: [
657658
'@nativescript/core/globals/index.js',
658659
'__jest__/src/__@nativescript_webpack_virtual_entry_javascript__',
660+
'@nativescript/core/bundle-entry-points.js',
659661
'__jest__/src/app.js'
660662
],
661663
'tns_modules/inspector_modules': [

packages/webpack5/__tests__/configuration/__snapshots__/react.spec.ts.snap

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
263263
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
264264
__CSS_PARSER__: '\\"css-tree\\"',
265265
__UI_USE_XML_PARSER__: true,
266-
__UI_USE_EXTERNAL_RENDERER__: true,
266+
__UI_USE_EXTERNAL_RENDERER__: false,
267267
__ANDROID__: true,
268268
__IOS__: false,
269269
'global.isAndroid': true,
@@ -324,6 +324,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
324324
entry: {
325325
bundle: [
326326
'@nativescript/core/globals/index.js',
327+
'@nativescript/core/bundle-entry-points.js',
327328
'__jest__/src/app.js',
328329
'@nativescript/core/ui/frame',
329330
'@nativescript/core/ui/frame/activity'
@@ -584,7 +585,7 @@ exports[`react configuration > android > base config 1`] = `
584585
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
585586
__CSS_PARSER__: '\\"css-tree\\"',
586587
__UI_USE_XML_PARSER__: true,
587-
__UI_USE_EXTERNAL_RENDERER__: true,
588+
__UI_USE_EXTERNAL_RENDERER__: false,
588589
__ANDROID__: true,
589590
__IOS__: false,
590591
'global.isAndroid': true,
@@ -634,6 +635,7 @@ exports[`react configuration > android > base config 1`] = `
634635
entry: {
635636
bundle: [
636637
'@nativescript/core/globals/index.js',
638+
'@nativescript/core/bundle-entry-points.js',
637639
'__jest__/src/app.js',
638640
'@nativescript/core/ui/frame',
639641
'@nativescript/core/ui/frame/activity'
@@ -905,7 +907,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
905907
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
906908
__CSS_PARSER__: '\\"css-tree\\"',
907909
__UI_USE_XML_PARSER__: true,
908-
__UI_USE_EXTERNAL_RENDERER__: true,
910+
__UI_USE_EXTERNAL_RENDERER__: false,
909911
__ANDROID__: false,
910912
__IOS__: true,
911913
'global.isAndroid': false,
@@ -966,6 +968,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
966968
entry: {
967969
bundle: [
968970
'@nativescript/core/globals/index.js',
971+
'@nativescript/core/bundle-entry-points.js',
969972
'__jest__/src/app.js'
970973
],
971974
'tns_modules/inspector_modules': [
@@ -1227,7 +1230,7 @@ exports[`react configuration > ios > base config 1`] = `
12271230
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
12281231
__CSS_PARSER__: '\\"css-tree\\"',
12291232
__UI_USE_XML_PARSER__: true,
1230-
__UI_USE_EXTERNAL_RENDERER__: true,
1233+
__UI_USE_EXTERNAL_RENDERER__: false,
12311234
__ANDROID__: false,
12321235
__IOS__: true,
12331236
'global.isAndroid': false,
@@ -1277,6 +1280,7 @@ exports[`react configuration > ios > base config 1`] = `
12771280
entry: {
12781281
bundle: [
12791282
'@nativescript/core/globals/index.js',
1283+
'@nativescript/core/bundle-entry-points.js',
12801284
'__jest__/src/app.js'
12811285
],
12821286
'tns_modules/inspector_modules': [

packages/webpack5/__tests__/configuration/__snapshots__/svelte.spec.ts.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ exports[`svelte configuration for android 1`] = `
274274
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
275275
__CSS_PARSER__: '\\"css-tree\\"',
276276
__UI_USE_XML_PARSER__: true,
277-
__UI_USE_EXTERNAL_RENDERER__: true,
277+
__UI_USE_EXTERNAL_RENDERER__: false,
278278
__ANDROID__: true,
279279
__IOS__: false,
280280
'global.isAndroid': true,
@@ -322,6 +322,7 @@ exports[`svelte configuration for android 1`] = `
322322
entry: {
323323
bundle: [
324324
'@nativescript/core/globals/index.js',
325+
'@nativescript/core/bundle-entry-points.js',
325326
'__jest__/src/app.js',
326327
'@nativescript/core/ui/frame',
327328
'@nativescript/core/ui/frame/activity'
@@ -604,7 +605,7 @@ exports[`svelte configuration for ios 1`] = `
604605
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
605606
__CSS_PARSER__: '\\"css-tree\\"',
606607
__UI_USE_XML_PARSER__: true,
607-
__UI_USE_EXTERNAL_RENDERER__: true,
608+
__UI_USE_EXTERNAL_RENDERER__: false,
608609
__ANDROID__: false,
609610
__IOS__: true,
610611
'global.isAndroid': false,
@@ -652,6 +653,7 @@ exports[`svelte configuration for ios 1`] = `
652653
entry: {
653654
bundle: [
654655
'@nativescript/core/globals/index.js',
656+
'@nativescript/core/bundle-entry-points.js',
655657
'__jest__/src/app.js'
656658
],
657659
'tns_modules/inspector_modules': [

packages/webpack5/__tests__/configuration/__snapshots__/typescript.spec.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ exports[`typescript configuration for android 1`] = `
324324
bundle: [
325325
'@nativescript/core/globals/index.js',
326326
'__jest__/src/__@nativescript_webpack_virtual_entry_typescript__',
327+
'@nativescript/core/bundle-entry-points.js',
327328
'__jest__/src/app.js',
328329
'@nativescript/core/ui/frame',
329330
'@nativescript/core/ui/frame/activity'
@@ -656,6 +657,7 @@ exports[`typescript configuration for ios 1`] = `
656657
bundle: [
657658
'@nativescript/core/globals/index.js',
658659
'__jest__/src/__@nativescript_webpack_virtual_entry_typescript__',
660+
'@nativescript/core/bundle-entry-points.js',
659661
'__jest__/src/app.js'
660662
],
661663
'tns_modules/inspector_modules': [

packages/webpack5/__tests__/configuration/__snapshots__/vue.spec.ts.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ exports[`vue configuration for android 1`] = `
288288
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
289289
__CSS_PARSER__: '\\"css-tree\\"',
290290
__UI_USE_XML_PARSER__: true,
291-
__UI_USE_EXTERNAL_RENDERER__: true,
291+
__UI_USE_EXTERNAL_RENDERER__: false,
292292
__ANDROID__: true,
293293
__IOS__: false,
294294
'global.isAndroid': true,
@@ -336,6 +336,7 @@ exports[`vue configuration for android 1`] = `
336336
entry: {
337337
bundle: [
338338
'@nativescript/core/globals/index.js',
339+
'@nativescript/core/bundle-entry-points.js',
339340
'__jest__/src/app.js',
340341
'@nativescript/core/ui/frame',
341342
'@nativescript/core/ui/frame/activity'
@@ -632,7 +633,7 @@ exports[`vue configuration for ios 1`] = `
632633
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
633634
__CSS_PARSER__: '\\"css-tree\\"',
634635
__UI_USE_XML_PARSER__: true,
635-
__UI_USE_EXTERNAL_RENDERER__: true,
636+
__UI_USE_EXTERNAL_RENDERER__: false,
636637
__ANDROID__: false,
637638
__IOS__: true,
638639
'global.isAndroid': false,
@@ -680,6 +681,7 @@ exports[`vue configuration for ios 1`] = `
680681
entry: {
681682
bundle: [
682683
'@nativescript/core/globals/index.js',
684+
'@nativescript/core/bundle-entry-points.js',
683685
'__jest__/src/app.js'
684686
],
685687
'tns_modules/inspector_modules': [

packages/webpack5/src/configuration/angular.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,14 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
223223
])
224224
);
225225

226-
config.plugin('DefinePlugin').tap((args) => {
227-
args[0] = merge(args[0], {
228-
__UI_USE_EXTERNAL_RENDERER__: true,
229-
});
230-
231-
return args;
232-
});
226+
// todo: re-visit later, disabling by default now
227+
// config.plugin('DefinePlugin').tap((args) => {
228+
// args[0] = merge(args[0], {
229+
// __UI_USE_EXTERNAL_RENDERER__: true,
230+
// });
231+
232+
// return args;
233+
// });
233234

234235
return config;
235236
}

packages/webpack5/src/configuration/base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
8787
.entry('bundle')
8888
// ensure we load nativescript globals first
8989
.add('@nativescript/core/globals/index.js')
90+
.add('@nativescript/core/bundle-entry-points.js')
9091
.add(entryPath);
9192

9293
// Add android app components to the bundle to SBG can generate the java classes

packages/webpack5/src/configuration/react.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
2626
args[0] = merge(args[0], {
2727
/** For various libraries in the React ecosystem. */
2828
__TEST__: false,
29-
__UI_USE_EXTERNAL_RENDERER__: true,
29+
// todo: re-visit later, disabling by default now
30+
// __UI_USE_EXTERNAL_RENDERER__: true,
3031
/**
3132
* Primarily for React Fast Refresh plugin, but technically the allowHmrInProduction option could be used instead.
3233
* Worth including anyway, as there are plenty of Node libraries that use this flag.

0 commit comments

Comments
 (0)