Skip to content

Commit 90d208c

Browse files
authored
feat(webpack): allow passing env.appComponents and env.entries (NativeScript#8898)
1 parent 5fe2742 commit 90d208c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/webpack/templates/webpack.angular.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ module.exports = (env) => {
5656
snapshotInDocker, // --env.snapshotInDocker
5757
skipSnapshotTools, // --env.skipSnapshotTools
5858
compileSnapshot, // --env.compileSnapshot
59+
appComponents = [],
60+
entries = {}
5961
} = env;
6062

6163
const { fileReplacements, copyReplacements } = parseWorkspaceConfig(platform, configuration, projectName);
@@ -83,7 +85,7 @@ module.exports = (env) => {
8385
}
8486
const entryModule = `${nsWebpack.getEntryModule(appFullPath, platform)}.ts`;
8587
const entryPath = `.${sep}${entryModule}`;
86-
const entries = { bundle: entryPath };
88+
Object.assign(entries, { bundle: entryPath }, entries);
8789
const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some((e) => e.indexOf('@nativescript') > -1);
8890
if (platform === 'ios' && !areCoreModulesExternal && !testing) {
8991
entries['tns_modules/@nativescript/core/inspector_modules'] = 'inspector_modules';
@@ -141,6 +143,9 @@ module.exports = (env) => {
141143
}
142144

143145
const noEmitOnErrorFromTSConfig = getNoEmitOnErrorFromTSConfig(tsConfigName);
146+
147+
appComponents.push("@nativescript/core/ui/frame",
148+
"@nativescript/core/ui/frame/activity");
144149

145150
nsWebpack.processAppComponents(appComponents, platform);
146151
const config = {

0 commit comments

Comments
 (0)