Dotenv in Angular

How can I use my .env(dotenv) file in Angular ?

When i type require(‘dotenv’).config() in environment.ts ,
the terminal says : cannot find “require” .

And then i cannot use process.env in my later codes.