Content-Length: 242813 | pFad | https://github.com/NativeScript/NativeScript/pull/10401

D2 fix(webpack): Adjust appComponents Env by azriel46d · Pull Request #10401 · NativeScript/NativeScript · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webpack): Adjust appComponents Env #10401

Merged
merged 1 commit into from
Oct 9, 2023
Merged

Conversation

azriel46d
Copy link
Contributor

@azriel46d azriel46d commented Oct 9, 2023

Documentation indicates https://beta.docs.nativescript.org/configuration/webpack#env-appcomponents where --env.appComponents=./someActivity.js can be passed.

However, when utilsing this, webpack throws an error appComponents.push is not a function when 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?

  1. Create a new app
  2. Add a CustomActivity.js
  3. ns build android --env.appComponents=./CustomActivity.js

TypeError: appComponents.push is not a function

What is the new behavior?

Build continues normally

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
@cla-bot cla-bot bot added the cla: yes label Oct 9, 2023
@rigor789 rigor789 merged commit 0b5393d into NativeScript:main Oct 9, 2023
tdermendjiev pushed a commit to tdermendjiev/NativeScript that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/NativeScript/NativeScript/pull/10401

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy