webpack-cli icon indicating copy to clipboard operation
webpack-cli copied to clipboard

implement built-in `.env` support

Open alexander-akait opened this issue 2 years ago • 20 comments

I think we need to implement built-in .env support, there is a good plugin https://github.com/mrsteele/dotenv-webpack

Describe the solution you'd like

Allow to red env variables from .env file and control it using CLI option

Describe alternatives you've considered

No need

Additional context

No need

alexander-akait avatar Apr 21 '23 15:04 alexander-akait

How about supporting vite's files? I think multiple files are almost required if you have default vars checked in git and then have another file to override those vars at build time. If the same files as vite could be supported, it'd be some nice compatibilty.

silverwind avatar Apr 21 '23 21:04 silverwind

Yeah :+1:

alexander-akait avatar Apr 21 '23 21:04 alexander-akait

@alexander-akait I want to do this 🚀 Would it be weird to add webpack config to the home directory? 🤔

mertcanaltin avatar Apr 24 '23 13:04 mertcanaltin

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

webpack-bot avatar Oct 26 '23 22:10 webpack-bot

@webpack-bot keep open.

silverwind avatar Oct 30 '23 21:10 silverwind