ngoworldcommunity/NGOWorld

Feature: Use .env file for Port, Network Expose and remove React Scripts

developerTested opened this issue · 4 comments

Description

Currently package.json contain React-Scripts which is not being used in my view.

Vite development Port is set in package.json and Vite.config.js which is HardCoded so it should be .env file based so if repo update user changes regrading PORT and NETWORK expose shouldn't be override by updates.

Proposed Solution

  1. Remove port from package.json and vite config
  2. Remove React-Scripts

Screenshots

No response

🥦 Browser

Mozilla Firefox

Checklist ✅

  • I checked and didn't find similar issue
  • I have read the Contributing Guidelines
  • I am participating in JWOC
  • I am participating in IWOC
  • I am willing to work on this issue (blank for no)

Hello @developerTested, thank you for raising the issue.

Currently, the issue is marked as https://github.com/MilanCommunity/Milan/labels/status%3A%20todo%20%E2%8F%B3 so please wait until the maintainers/owner review it and provide you with feedback/suggestions to proceed further.

Feel free to reach out to Tamal on Twitter, or drop a mail at tamalcodes@gmail.com if you think that this issue is of critical priority.

Give us a ⭐ to show some support
Happy OpenSource 🚀

I think vite --port 3000 solves this problem

I think vite --port 3000 solves this problem

You're but that is issue because that is hardcoded in package.json which can be overridden when thee is an update in package.json so to bypass that u need to store it somewhere user have control over it.

Check repo package.json and vite.config.js there its Hardcoded.

if we use .env file no user change will be overridden which is main aim of this issue

Hey @developerTested , this is a good DX - please start working on the same.

Also yes, I guess we never removed the unused dependencies - while you are at it, do remove the unused ones. Add documentation and update .env.example for the same.

📑 Checklist in case you missed something

Please maintain structure, use conventional pull request titles, and avoid spam to avoid closure or bans.