1

I have added .env file in my react project that means when project uploads in the server in console source showing all components.

I got to add .env that file I worte

GENERATE_SOURCEMAP = false;

but Still it's showing all components in source can any one help me out?

Thanks adv

3
  • You should ideally be using webpack config for source map changes. Reference - stackoverflow.com/questions/30870830/… Commented Jul 31, 2018 at 5:27
  • @kiran, I think you should delete .map file before code push to server using script. I usually use rimraf package to remove all .map files. I used this script "postbuild": "rimraf build/**/*.map" to remove my script after code build process done. Commented Jul 31, 2018 at 6:21
  • Note: It is recommended to leave source maps in your builds. Commented Jul 31, 2018 at 7:40

1 Answer 1

1

Try removing the semicolon:

GENERATE_SOURCEMAP=false

Under the hood, dotenv is used to read .env files.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.