mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
fix: handle appComponents (closes #9126)
This commit is contained in:
@ -259,7 +259,9 @@ exports[`angular configuration for android 1`] = `
|
|||||||
entry: {
|
entry: {
|
||||||
bundle: [
|
bundle: [
|
||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js',
|
||||||
|
'@nativescript/core/ui/frame',
|
||||||
|
'@nativescript/core/ui/frame/activity'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@ -526,7 +528,7 @@ exports[`angular configuration for ios 1`] = `
|
|||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js'
|
||||||
],
|
],
|
||||||
'tns_modules/@nativescript/core/inspector_modules': [
|
'tns_modules/inspector_modules': [
|
||||||
'@nativescript/core/inspector_modules'
|
'@nativescript/core/inspector_modules'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,9 @@ exports[`base configuration for android 1`] = `
|
|||||||
entry: {
|
entry: {
|
||||||
bundle: [
|
bundle: [
|
||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js',
|
||||||
|
'@nativescript/core/ui/frame',
|
||||||
|
'@nativescript/core/ui/frame/activity'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@ -502,7 +504,7 @@ exports[`base configuration for ios 1`] = `
|
|||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js'
|
||||||
],
|
],
|
||||||
'tns_modules/@nativescript/core/inspector_modules': [
|
'tns_modules/inspector_modules': [
|
||||||
'@nativescript/core/inspector_modules'
|
'@nativescript/core/inspector_modules'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -269,6 +269,8 @@ exports[`javascript configuration for android 1`] = `
|
|||||||
bundle: [
|
bundle: [
|
||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js',
|
'__jest__/src/app.js',
|
||||||
|
'@nativescript/core/ui/frame',
|
||||||
|
'@nativescript/core/ui/frame/activity',
|
||||||
'__jest__/src/__virtual_entry__.js'
|
'__jest__/src/__virtual_entry__.js'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -546,7 +548,7 @@ exports[`javascript configuration for ios 1`] = `
|
|||||||
'__jest__/src/app.js',
|
'__jest__/src/app.js',
|
||||||
'__jest__/src/__virtual_entry__.js'
|
'__jest__/src/__virtual_entry__.js'
|
||||||
],
|
],
|
||||||
'tns_modules/@nativescript/core/inspector_modules': [
|
'tns_modules/inspector_modules': [
|
||||||
'@nativescript/core/inspector_modules'
|
'@nativescript/core/inspector_modules'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,9 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
|
|||||||
entry: {
|
entry: {
|
||||||
bundle: [
|
bundle: [
|
||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js',
|
||||||
|
'@nativescript/core/ui/frame',
|
||||||
|
'@nativescript/core/ui/frame/activity'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@ -534,7 +536,9 @@ exports[`react configuration > android > base config 1`] = `
|
|||||||
entry: {
|
entry: {
|
||||||
bundle: [
|
bundle: [
|
||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js',
|
||||||
|
'@nativescript/core/ui/frame',
|
||||||
|
'@nativescript/core/ui/frame/activity'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@ -817,7 +821,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
|
|||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js'
|
||||||
],
|
],
|
||||||
'tns_modules/@nativescript/core/inspector_modules': [
|
'tns_modules/inspector_modules': [
|
||||||
'@nativescript/core/inspector_modules'
|
'@nativescript/core/inspector_modules'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -1079,7 +1083,7 @@ exports[`react configuration > ios > base config 1`] = `
|
|||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js'
|
||||||
],
|
],
|
||||||
'tns_modules/@nativescript/core/inspector_modules': [
|
'tns_modules/inspector_modules': [
|
||||||
'@nativescript/core/inspector_modules'
|
'@nativescript/core/inspector_modules'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -272,7 +272,9 @@ exports[`svelte configuration for android 1`] = `
|
|||||||
entry: {
|
entry: {
|
||||||
bundle: [
|
bundle: [
|
||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js',
|
||||||
|
'@nativescript/core/ui/frame',
|
||||||
|
'@nativescript/core/ui/frame/activity'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@ -552,7 +554,7 @@ exports[`svelte configuration for ios 1`] = `
|
|||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js'
|
||||||
],
|
],
|
||||||
'tns_modules/@nativescript/core/inspector_modules': [
|
'tns_modules/inspector_modules': [
|
||||||
'@nativescript/core/inspector_modules'
|
'@nativescript/core/inspector_modules'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,9 @@ exports[`vue configuration for android 1`] = `
|
|||||||
entry: {
|
entry: {
|
||||||
bundle: [
|
bundle: [
|
||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js',
|
||||||
|
'@nativescript/core/ui/frame',
|
||||||
|
'@nativescript/core/ui/frame/activity'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@ -566,7 +568,7 @@ exports[`vue configuration for ios 1`] = `
|
|||||||
'@nativescript/core/globals/index.js',
|
'@nativescript/core/globals/index.js',
|
||||||
'__jest__/src/app.js'
|
'__jest__/src/app.js'
|
||||||
],
|
],
|
||||||
'tns_modules/@nativescript/core/inspector_modules': [
|
'tns_modules/inspector_modules': [
|
||||||
'@nativescript/core/inspector_modules'
|
'@nativescript/core/inspector_modules'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -54,10 +54,20 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
|||||||
.add('@nativescript/core/globals/index.js')
|
.add('@nativescript/core/globals/index.js')
|
||||||
.add(entryPath);
|
.add(entryPath);
|
||||||
|
|
||||||
|
// Add android app components to the bundle to SBG can generate the java classes
|
||||||
|
if (platform === 'android') {
|
||||||
|
const appComponents = env.appComponents || [];
|
||||||
|
appComponents.push('@nativescript/core/ui/frame');
|
||||||
|
appComponents.push('@nativescript/core/ui/frame/activity');
|
||||||
|
appComponents.map((component) => {
|
||||||
|
config.entry('bundle').add(component);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// inspector_modules
|
// inspector_modules
|
||||||
config.when(shouldIncludeInspectorModules(), (config) => {
|
config.when(shouldIncludeInspectorModules(), (config) => {
|
||||||
config
|
config
|
||||||
.entry('tns_modules/@nativescript/core/inspector_modules')
|
.entry('tns_modules/inspector_modules')
|
||||||
.add('@nativescript/core/inspector_modules');
|
.add('@nativescript/core/inspector_modules');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ export interface IWebpackEnv {
|
|||||||
|
|
||||||
appPath?: string;
|
appPath?: string;
|
||||||
appResourcesPath?: string;
|
appResourcesPath?: string;
|
||||||
|
appComponents?: string[];
|
||||||
|
|
||||||
nativescriptLibPath?: string;
|
nativescriptLibPath?: string;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user