jonnynabors / docusaurus2-dotenv

19 stars 3 forks source link

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

Open huynguyen93 opened 3 years ago

huynguyen93 commented 3 years ago

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?

ssolders commented 3 years ago

Getting the same issue

roy-rayyone commented 2 years ago

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