I've repurposed the above into what I feel is a cleaner solution. In my .storybook directory, I created a .env.storybook file with my desired env vars. To parse this file, I used the dotenv package: npm i -D dotenv or yarn add --dev dotenv. Then, in my main.js file: const ...