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

`grommet pack` does not consider .env file contents

Open thg303 opened this issue 4 years ago • 1 comments

how to reproduce:

  1. build a new project.
  2. create a .env file and set a variable in it like:
PORT=5050
  1. run npm run dev it serves it on the default port (3000).

the expected behaviour is serving the app on http://localhost:5050

thg303 avatar Apr 17 '20 10:04 thg303

looks like babel puts imports statements above 'require`s so the pack scrip loads before dotenv has any chance to load the .env file.

thg303 avatar Apr 17 '20 10:04 thg303