diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/angular.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/angular.spec.ts.snap index 44d96f203..c888c2aad 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/angular.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/angular.spec.ts.snap @@ -312,7 +312,7 @@ exports[`angular configuration for android 1`] = ` __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, __IOS__: false, 'global.isAndroid': true, @@ -379,6 +379,7 @@ exports[`angular configuration for android 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js', '@nativescript/core/ui/frame', '@nativescript/core/ui/frame/activity' @@ -699,7 +700,7 @@ exports[`angular configuration for ios 1`] = ` __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, __IOS__: true, 'global.isAndroid': false, @@ -766,6 +767,7 @@ exports[`angular configuration for ios 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js' ], 'tns_modules/inspector_modules': [ @@ -778,6 +780,7 @@ exports[`angular configuration for ios 1`] = ` exports[`angular configuration loads polyfills.android.ts into the bundle entry if it exists 1`] = ` Array [ "__jest__/src/polyfills.android.ts", + "@nativescript/core/bundle-entry-points.js", "__jest__/src/app.js", "@nativescript/core/ui/frame", "@nativescript/core/ui/frame/activity", @@ -787,6 +790,7 @@ Array [ exports[`angular configuration loads polyfills.ios.ts into the bundle entry if it exists 1`] = ` Array [ "__jest__/src/polyfills.ios.ts", + "@nativescript/core/bundle-entry-points.js", "__jest__/src/app.js", ] `; @@ -794,6 +798,7 @@ Array [ exports[`angular configuration loads polyfills.ts into the bundle entry if it exists 1`] = ` Array [ "__jest__/src/polyfills.ts", + "@nativescript/core/bundle-entry-points.js", "__jest__/src/app.js", ] `; diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/base.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/base.spec.ts.snap index 14203bb11..9209dd850 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/base.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/base.spec.ts.snap @@ -302,6 +302,7 @@ exports[`base configuration for android 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js', '@nativescript/core/ui/frame', '@nativescript/core/ui/frame/activity' @@ -612,6 +613,7 @@ exports[`base configuration for ios 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js' ], 'tns_modules/inspector_modules': [ diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/javascript.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/javascript.spec.ts.snap index a22606bfb..7963019e3 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/javascript.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/javascript.spec.ts.snap @@ -324,6 +324,7 @@ exports[`javascript configuration for android 1`] = ` bundle: [ '@nativescript/core/globals/index.js', '__jest__/src/__@nativescript_webpack_virtual_entry_javascript__', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js', '@nativescript/core/ui/frame', '@nativescript/core/ui/frame/activity' @@ -656,6 +657,7 @@ exports[`javascript configuration for ios 1`] = ` bundle: [ '@nativescript/core/globals/index.js', '__jest__/src/__@nativescript_webpack_virtual_entry_javascript__', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js' ], 'tns_modules/inspector_modules': [ diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/react.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/react.spec.ts.snap index cc9841c9c..10de0bf00 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/react.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/react.spec.ts.snap @@ -263,7 +263,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, __IOS__: false, 'global.isAndroid': true, @@ -324,6 +324,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js', '@nativescript/core/ui/frame', '@nativescript/core/ui/frame/activity' @@ -584,7 +585,7 @@ exports[`react configuration > android > base config 1`] = ` __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, __IOS__: false, 'global.isAndroid': true, @@ -634,6 +635,7 @@ exports[`react configuration > android > base config 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js', '@nativescript/core/ui/frame', '@nativescript/core/ui/frame/activity' @@ -905,7 +907,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, __IOS__: true, 'global.isAndroid': false, @@ -966,6 +968,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js' ], 'tns_modules/inspector_modules': [ @@ -1227,7 +1230,7 @@ exports[`react configuration > ios > base config 1`] = ` __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, __IOS__: true, 'global.isAndroid': false, @@ -1277,6 +1280,7 @@ exports[`react configuration > ios > base config 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js' ], 'tns_modules/inspector_modules': [ diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/svelte.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/svelte.spec.ts.snap index 173625fc9..f17a1d443 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/svelte.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/svelte.spec.ts.snap @@ -274,7 +274,7 @@ exports[`svelte configuration for android 1`] = ` __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, __IOS__: false, 'global.isAndroid': true, @@ -322,6 +322,7 @@ exports[`svelte configuration for android 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js', '@nativescript/core/ui/frame', '@nativescript/core/ui/frame/activity' @@ -604,7 +605,7 @@ exports[`svelte configuration for ios 1`] = ` __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, __IOS__: true, 'global.isAndroid': false, @@ -652,6 +653,7 @@ exports[`svelte configuration for ios 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js' ], 'tns_modules/inspector_modules': [ diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/typescript.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/typescript.spec.ts.snap index b4d8676d8..c32035b0b 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/typescript.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/typescript.spec.ts.snap @@ -324,6 +324,7 @@ exports[`typescript configuration for android 1`] = ` bundle: [ '@nativescript/core/globals/index.js', '__jest__/src/__@nativescript_webpack_virtual_entry_typescript__', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js', '@nativescript/core/ui/frame', '@nativescript/core/ui/frame/activity' @@ -656,6 +657,7 @@ exports[`typescript configuration for ios 1`] = ` bundle: [ '@nativescript/core/globals/index.js', '__jest__/src/__@nativescript_webpack_virtual_entry_typescript__', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js' ], 'tns_modules/inspector_modules': [ diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/vue.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/vue.spec.ts.snap index 1845cc4ed..4282ea2d1 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/vue.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/vue.spec.ts.snap @@ -288,7 +288,7 @@ exports[`vue configuration for android 1`] = ` __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, __IOS__: false, 'global.isAndroid': true, @@ -336,6 +336,7 @@ exports[`vue configuration for android 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js', '@nativescript/core/ui/frame', '@nativescript/core/ui/frame/activity' @@ -632,7 +633,7 @@ exports[`vue configuration for ios 1`] = ` __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __CSS_PARSER__: '\\"css-tree\\"', __UI_USE_XML_PARSER__: true, - __UI_USE_EXTERNAL_RENDERER__: true, + __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, __IOS__: true, 'global.isAndroid': false, @@ -680,6 +681,7 @@ exports[`vue configuration for ios 1`] = ` entry: { bundle: [ '@nativescript/core/globals/index.js', + '@nativescript/core/bundle-entry-points.js', '__jest__/src/app.js' ], 'tns_modules/inspector_modules': [ diff --git a/packages/webpack5/src/configuration/angular.ts b/packages/webpack5/src/configuration/angular.ts index 80d3608d9..c50754244 100644 --- a/packages/webpack5/src/configuration/angular.ts +++ b/packages/webpack5/src/configuration/angular.ts @@ -223,13 +223,14 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { ]) ); - config.plugin('DefinePlugin').tap((args) => { - args[0] = merge(args[0], { - __UI_USE_EXTERNAL_RENDERER__: true, - }); + // todo: re-visit later, disabling by default now + // config.plugin('DefinePlugin').tap((args) => { + // args[0] = merge(args[0], { + // __UI_USE_EXTERNAL_RENDERER__: true, + // }); - return args; - }); + // return args; + // }); return config; } diff --git a/packages/webpack5/src/configuration/base.ts b/packages/webpack5/src/configuration/base.ts index 33069f8cb..37d85c86d 100644 --- a/packages/webpack5/src/configuration/base.ts +++ b/packages/webpack5/src/configuration/base.ts @@ -87,6 +87,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { .entry('bundle') // ensure we load nativescript globals first .add('@nativescript/core/globals/index.js') + .add('@nativescript/core/bundle-entry-points.js') .add(entryPath); // Add android app components to the bundle to SBG can generate the java classes diff --git a/packages/webpack5/src/configuration/react.ts b/packages/webpack5/src/configuration/react.ts index 2bbf05ee4..f05b62acd 100644 --- a/packages/webpack5/src/configuration/react.ts +++ b/packages/webpack5/src/configuration/react.ts @@ -26,7 +26,8 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { args[0] = merge(args[0], { /** For various libraries in the React ecosystem. */ __TEST__: false, - __UI_USE_EXTERNAL_RENDERER__: true, + // todo: re-visit later, disabling by default now + // __UI_USE_EXTERNAL_RENDERER__: true, /** * Primarily for React Fast Refresh plugin, but technically the allowHmrInProduction option could be used instead. * Worth including anyway, as there are plenty of Node libraries that use this flag. diff --git a/packages/webpack5/src/configuration/svelte.ts b/packages/webpack5/src/configuration/svelte.ts index 892e2c72a..e5feea09e 100644 --- a/packages/webpack5/src/configuration/svelte.ts +++ b/packages/webpack5/src/configuration/svelte.ts @@ -85,13 +85,14 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { }); } - config.plugin('DefinePlugin').tap((args) => { - args[0] = merge(args[0], { - __UI_USE_EXTERNAL_RENDERER__: true, - }); + // todo: re-visit later, disabling by default now + // config.plugin('DefinePlugin').tap((args) => { + // args[0] = merge(args[0], { + // __UI_USE_EXTERNAL_RENDERER__: true, + // }); - return args; - }); + // return args; + // }); return config; } diff --git a/packages/webpack5/src/configuration/vue.ts b/packages/webpack5/src/configuration/vue.ts index 4cb776b46..8a5f7d224 100644 --- a/packages/webpack5/src/configuration/vue.ts +++ b/packages/webpack5/src/configuration/vue.ts @@ -88,13 +88,14 @@ export default function (config: Config, env: IWebpackEnv = _env): Config { // add an alias for vue, since some plugins may try to import it config.resolve.alias.set('vue', 'nativescript-vue'); - config.plugin('DefinePlugin').tap((args) => { - args[0] = merge(args[0], { - __UI_USE_EXTERNAL_RENDERER__: true, - }); + // todo: re-visit later, disabling by default now + // config.plugin('DefinePlugin').tap((args) => { + // args[0] = merge(args[0], { + // __UI_USE_EXTERNAL_RENDERER__: true, + // }); - return args; - }); + // return args; + // }); return config; }