Learn How to Use Angular Environment Variables with Custom Webpack

Опубликовано: 07 Октябрь 2024
на канале: Code Shots With Profanis
12,793
249

This video will teach you how to create environmental variables using an angular custom webpack configuration.

The goal is to create the environment variables from the terminal (useful even for CI systems), and also use the .env file.

At first, you will see how to use the webpack's EnvironmentPlugin and then an improvement that replaces the EnvironmentPlugin with the DotEnvPlugin

✨ Chapters:
0:00 Intro
1:03 Understand process.env
4:27 Use process in Angular
5:26 Setup a custom webpack configuration
7:59 Using EnvironmentPlugin
10:42 Using DotEnvPlugin
15:14 Thank you

✨ Code: https://github.com/profanis/codeShots...
✨ Environment Plugin: https://webpack.js.org/plugins/enviro...
✨ DotEnv Plugin: https://github.com/mrsteele/dotenv-we...

******************************************************
Let's connect
******************************************************
Twitter:   / prodromouf  
LinkedIn:   / prodromouf  

#angular #learnAngular #angularTutorial #webdevelopment #webdeveloper #angularenvironemtvariables #angularenvironmentsetup