docusaurus2-dotenv icon indicating copy to clipboard operation
docusaurus2-dotenv copied to clipboard

Does this plugin support development environment (ie: when running project with "docusaurus start")

Open huynguyen93 opened this issue 3 years ago • 2 comments

Hello, thanks for making this plugin, I have a question.

When I use an env variable in a custom page:

// pages/index.js

const myEnv = process.env.TEST_ENV;

It worked when compiling with "docusaurus build", but when I start the project with "docusaurus start", I got this error "ReferenceError: process is not defined"

Is this a normal behavior?

huynguyen93 avatar Jul 31 '21 09:07 huynguyen93

Getting the same issue

ssolders avatar Sep 03 '21 08:09 ssolders

This repository seems not updating for a long time. I forked one at https://github.com/rayyone/docusaurus2-dotenv-2 and make it works with develop environment

roy-rayyone avatar Oct 01 '22 11:10 roy-rayyone