Getting environment info in customWebpackConfig.
See original GitHub issueEnvironment info
Is it possible to get the specific environment info in the customWebpackConfig
, for example:
- We run
ng build -c staging
, the data we got is which we defined inenvironment.staging.ts
- We run
ng build -c production
, the data we got is which we defined inenvironment.production.ts
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Pass custom environment parameters to @angular-builders ...
Is it possible to do something like this? In the customWebpackConfig file I can read the outputPath from options module.exports = (config, ...
Read more >Environment Variables - webpack
The webpack command line environment option --env allows you to pass in as many environment variables as you like. Environment variables will be...
Read more >Learn How to Use Angular Environment Variables ... - YouTube
This video will teach you how to create environmental variables using an angular custom webpack configuration.The goal is to create the ...
Read more >How To Use Custom webpack Configurations with Angular ...
Learn how to create a custom webpack config inside an Angular project using CLI Builders. This example will reduce the file size of...
Read more >Adding a Custom webpack Config - Gatsby
Before creating custom webpack configuration, check to see if there's a Gatsby plugin already built that handles your use case in the…
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok ok, I know what the problem is. You use
index-transform.ts
instead ofindex-transform.js
and it is not supported. The trick you did causes webpack builder to register TS compiler forcustomWebpackConfig
(in which TS is supported) and the side-effect is that you can also load yourindex-transform.ts
.Would you mind opening a feature request to support TS for
indexTransform
?PR is also welcome btw, it should be very small.
In short, we need to improve two things:
custom webpack config
(issue already raised by you)index Transform
(I will create a new issue for that) BTW, thank you for your time.