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\\"]',
__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",
]
`;

View File

@ -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': [

View File

@ -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': [

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\\"]',
__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': [

View File

@ -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': [

View File

@ -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': [

View File

@ -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': [

View File

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

View File

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

View File

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

View File

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

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