fix: include bundle-entry-points by default

This commit is contained in:
Igor Randjelovic
2021-09-07 19:58:12 +02:00
committed by Nathan Walker
parent 8bc4878a81
commit 5ff85bfae9
12 changed files with 53 additions and 29 deletions

View File

@ -312,7 +312,7 @@ exports[`angular configuration for android 1`] = `
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: true, __ANDROID__: true,
__IOS__: false, __IOS__: false,
'global.isAndroid': true, 'global.isAndroid': true,
@ -379,6 +379,7 @@ exports[`angular configuration for android 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js', '__jest__/src/app.js',
'@nativescript/core/ui/frame', '@nativescript/core/ui/frame',
'@nativescript/core/ui/frame/activity' '@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\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: false, __ANDROID__: false,
__IOS__: true, __IOS__: true,
'global.isAndroid': false, 'global.isAndroid': false,
@ -766,6 +767,7 @@ exports[`angular configuration for ios 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js' '__jest__/src/app.js'
], ],
'tns_modules/inspector_modules': [ '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`] = ` exports[`angular configuration loads polyfills.android.ts into the bundle entry if it exists 1`] = `
Array [ Array [
"__jest__/src/polyfills.android.ts", "__jest__/src/polyfills.android.ts",
"@nativescript/core/bundle-entry-points.js",
"__jest__/src/app.js", "__jest__/src/app.js",
"@nativescript/core/ui/frame", "@nativescript/core/ui/frame",
"@nativescript/core/ui/frame/activity", "@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`] = ` exports[`angular configuration loads polyfills.ios.ts into the bundle entry if it exists 1`] = `
Array [ Array [
"__jest__/src/polyfills.ios.ts", "__jest__/src/polyfills.ios.ts",
"@nativescript/core/bundle-entry-points.js",
"__jest__/src/app.js", "__jest__/src/app.js",
] ]
`; `;
@ -794,6 +798,7 @@ Array [
exports[`angular configuration loads polyfills.ts into the bundle entry if it exists 1`] = ` exports[`angular configuration loads polyfills.ts into the bundle entry if it exists 1`] = `
Array [ Array [
"__jest__/src/polyfills.ts", "__jest__/src/polyfills.ts",
"@nativescript/core/bundle-entry-points.js",
"__jest__/src/app.js", "__jest__/src/app.js",
] ]
`; `;

View File

@ -302,6 +302,7 @@ exports[`base configuration for android 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js', '__jest__/src/app.js',
'@nativescript/core/ui/frame', '@nativescript/core/ui/frame',
'@nativescript/core/ui/frame/activity' '@nativescript/core/ui/frame/activity'
@ -612,6 +613,7 @@ exports[`base configuration for ios 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js' '__jest__/src/app.js'
], ],
'tns_modules/inspector_modules': [ 'tns_modules/inspector_modules': [

View File

@ -324,6 +324,7 @@ exports[`javascript configuration for android 1`] = `
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'__jest__/src/__@nativescript_webpack_virtual_entry_javascript__', '__jest__/src/__@nativescript_webpack_virtual_entry_javascript__',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js', '__jest__/src/app.js',
'@nativescript/core/ui/frame', '@nativescript/core/ui/frame',
'@nativescript/core/ui/frame/activity' '@nativescript/core/ui/frame/activity'
@ -656,6 +657,7 @@ exports[`javascript configuration for ios 1`] = `
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'__jest__/src/__@nativescript_webpack_virtual_entry_javascript__', '__jest__/src/__@nativescript_webpack_virtual_entry_javascript__',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js' '__jest__/src/app.js'
], ],
'tns_modules/inspector_modules': [ 'tns_modules/inspector_modules': [

View File

@ -263,7 +263,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: true, __ANDROID__: true,
__IOS__: false, __IOS__: false,
'global.isAndroid': true, 'global.isAndroid': true,
@ -324,6 +324,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js', '__jest__/src/app.js',
'@nativescript/core/ui/frame', '@nativescript/core/ui/frame',
'@nativescript/core/ui/frame/activity' '@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\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: true, __ANDROID__: true,
__IOS__: false, __IOS__: false,
'global.isAndroid': true, 'global.isAndroid': true,
@ -634,6 +635,7 @@ exports[`react configuration > android > base config 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js', '__jest__/src/app.js',
'@nativescript/core/ui/frame', '@nativescript/core/ui/frame',
'@nativescript/core/ui/frame/activity' '@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\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: false, __ANDROID__: false,
__IOS__: true, __IOS__: true,
'global.isAndroid': false, 'global.isAndroid': false,
@ -966,6 +968,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js' '__jest__/src/app.js'
], ],
'tns_modules/inspector_modules': [ '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\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: false, __ANDROID__: false,
__IOS__: true, __IOS__: true,
'global.isAndroid': false, 'global.isAndroid': false,
@ -1277,6 +1280,7 @@ exports[`react configuration > ios > base config 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js' '__jest__/src/app.js'
], ],
'tns_modules/inspector_modules': [ 'tns_modules/inspector_modules': [

View File

@ -274,7 +274,7 @@ exports[`svelte configuration for android 1`] = `
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: true, __ANDROID__: true,
__IOS__: false, __IOS__: false,
'global.isAndroid': true, 'global.isAndroid': true,
@ -322,6 +322,7 @@ exports[`svelte configuration for android 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js', '__jest__/src/app.js',
'@nativescript/core/ui/frame', '@nativescript/core/ui/frame',
'@nativescript/core/ui/frame/activity' '@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\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: false, __ANDROID__: false,
__IOS__: true, __IOS__: true,
'global.isAndroid': false, 'global.isAndroid': false,
@ -652,6 +653,7 @@ exports[`svelte configuration for ios 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js' '__jest__/src/app.js'
], ],
'tns_modules/inspector_modules': [ 'tns_modules/inspector_modules': [

View File

@ -324,6 +324,7 @@ exports[`typescript configuration for android 1`] = `
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'__jest__/src/__@nativescript_webpack_virtual_entry_typescript__', '__jest__/src/__@nativescript_webpack_virtual_entry_typescript__',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js', '__jest__/src/app.js',
'@nativescript/core/ui/frame', '@nativescript/core/ui/frame',
'@nativescript/core/ui/frame/activity' '@nativescript/core/ui/frame/activity'
@ -656,6 +657,7 @@ exports[`typescript configuration for ios 1`] = `
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'__jest__/src/__@nativescript_webpack_virtual_entry_typescript__', '__jest__/src/__@nativescript_webpack_virtual_entry_typescript__',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js' '__jest__/src/app.js'
], ],
'tns_modules/inspector_modules': [ 'tns_modules/inspector_modules': [

View File

@ -288,7 +288,7 @@ exports[`vue configuration for android 1`] = `
__NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: true, __ANDROID__: true,
__IOS__: false, __IOS__: false,
'global.isAndroid': true, 'global.isAndroid': true,
@ -336,6 +336,7 @@ exports[`vue configuration for android 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js', '__jest__/src/app.js',
'@nativescript/core/ui/frame', '@nativescript/core/ui/frame',
'@nativescript/core/ui/frame/activity' '@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\\"]', __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]',
__CSS_PARSER__: '\\"css-tree\\"', __CSS_PARSER__: '\\"css-tree\\"',
__UI_USE_XML_PARSER__: true, __UI_USE_XML_PARSER__: true,
__UI_USE_EXTERNAL_RENDERER__: true, __UI_USE_EXTERNAL_RENDERER__: false,
__ANDROID__: false, __ANDROID__: false,
__IOS__: true, __IOS__: true,
'global.isAndroid': false, 'global.isAndroid': false,
@ -680,6 +681,7 @@ exports[`vue configuration for ios 1`] = `
entry: { entry: {
bundle: [ bundle: [
'@nativescript/core/globals/index.js', '@nativescript/core/globals/index.js',
'@nativescript/core/bundle-entry-points.js',
'__jest__/src/app.js' '__jest__/src/app.js'
], ],
'tns_modules/inspector_modules': [ 'tns_modules/inspector_modules': [

View File

@ -223,13 +223,14 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
]) ])
); );
config.plugin('DefinePlugin').tap((args) => { // todo: re-visit later, disabling by default now
args[0] = merge(args[0], { // config.plugin('DefinePlugin').tap((args) => {
__UI_USE_EXTERNAL_RENDERER__: true, // args[0] = merge(args[0], {
}); // __UI_USE_EXTERNAL_RENDERER__: true,
// });
return args; // return args;
}); // });
return config; return config;
} }

View File

@ -87,6 +87,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
.entry('bundle') .entry('bundle')
// ensure we load nativescript globals first // ensure we load nativescript globals first
.add('@nativescript/core/globals/index.js') .add('@nativescript/core/globals/index.js')
.add('@nativescript/core/bundle-entry-points.js')
.add(entryPath); .add(entryPath);
// Add android app components to the bundle to SBG can generate the java classes // Add android app components to the bundle to SBG can generate the java classes

View File

@ -26,7 +26,8 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
args[0] = merge(args[0], { args[0] = merge(args[0], {
/** For various libraries in the React ecosystem. */ /** For various libraries in the React ecosystem. */
__TEST__: false, __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. * 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. * Worth including anyway, as there are plenty of Node libraries that use this flag.

View File

@ -85,13 +85,14 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
}); });
} }
config.plugin('DefinePlugin').tap((args) => { // todo: re-visit later, disabling by default now
args[0] = merge(args[0], { // config.plugin('DefinePlugin').tap((args) => {
__UI_USE_EXTERNAL_RENDERER__: true, // args[0] = merge(args[0], {
}); // __UI_USE_EXTERNAL_RENDERER__: true,
// });
return args; // return args;
}); // });
return config; return config;
} }

View File

@ -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 // add an alias for vue, since some plugins may try to import it
config.resolve.alias.set('vue', 'nativescript-vue'); config.resolve.alias.set('vue', 'nativescript-vue');
config.plugin('DefinePlugin').tap((args) => { // todo: re-visit later, disabling by default now
args[0] = merge(args[0], { // config.plugin('DefinePlugin').tap((args) => {
__UI_USE_EXTERNAL_RENDERER__: true, // args[0] = merge(args[0], {
}); // __UI_USE_EXTERNAL_RENDERER__: true,
// });
return args; // return args;
}); // });
return config; return config;
} }