feat: pass current CLI public lib path to webpack env #5381
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.
PR Checklist
What is the current behavior?
There is currently no way to get values from the
nativescript.config.ts
file in the webpack config unless you use a.js
config file.What is the new behavior?
With this change, the path to the nativescript lib (exposing the public API of the CLI) is passed to the webpack env, and the webpack config can read useful data from the CLI - inlcluding values from a ts config file. For example, the following would get the values from the
nativescript.config.ts
(or .js).Or even using the config service directly:
/cc @farfromrefug