Use .env files with sage 10

Hello there,

I’d like to use .env file on my projet. I already tried to add dotenv module but I have an error message with the fs module : Can’t resolve ‘fs’.
I saw some fixes but it’s for webpack.config.js files, and Sage 10 does not provide this file.

Do you have an idea how to use .env files on sage 10 ?

Can you explain how you want to use .env files? What is your use case? Can you provide your existing code?

You don’t need to set up dotenv on your own.