helloparthshah / StadiaWireless

Stadia Wireless enables you to use your stadia controller wirelessly. Not just with stadia, but with any game.
MIT License
446 stars 26 forks source link

[Optimization] Remove/Disable eruda by default in the release package #7

Closed ELowry closed 2 years ago

ELowry commented 2 years ago

Describe the bug Currently, the release version includes the eruda console. This is great for development and testing purposes, but adds a rather large JavaScript package to the client web page. As the system matures and becomes more reliable, it may be a good idea to remove this package by default.

To Reproduce N/A

Expected behavior Ideally, one of two solutions could be applied:

  1. The eruda script is not included in the release package at all; and is only included when deploying the project manually.
  2. The eruda script is only loaded if some parameter is set by the user. For example, this could require to add a console.js file to the StadiaWireless/static/ folder which sets a variable to true; only then would the script be loaded.

Screenshots N/A

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context One element to keep in mind is that including external scripts from CDNs can technically lead to some forms of tracking and increase the risk of malicious code. Since the whole project is locally self-hosted, it may be best to avoid loading any external assets entirely.

helloparthshah commented 2 years ago

I think removing eruda in the release would be the best solution although the source code could benefit from keeping it for debugging