Repository navigation
fix(webpack): Adjust appComponents Env - #10401
Merged
Merged
Conversation
Allows passing additional App Components for android. For example if you have a custom activity defined in myCustomActivity.ts you can pass --env.appComponents=myCustomActivity.ts to include it in the build. However this resolves to a string if its a single item
tdermendjiev
pushed a commit
to tdermendjiev/NativeScript
that referenced
this pull request
Oct 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation indicates https://beta.docs.nativescript.org/configuration/webpack#env-appcomponents where
--env.appComponents=./someActivity.jscan be passed.However, when utilsing this, webpack throws an error
appComponents.push is not a functionwhen a single Activity is added.This PR adjusts the reading of appCompnents env and if it is a single item, its wrapped inside an array
PR Checklist
What is the current behavior?
ns build android --env.appComponents=./CustomActivity.jsTypeError: appComponents.push is not a functionWhat is the new behavior?
Build continues normally