PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.49k stars 365 forks source link

[RFC] plasmo.config.ts #162

Open louisgv opened 2 years ago

louisgv commented 2 years ago

How do you envision this feature/change to look/work like?

Support a typed configuration file, mainly for manifest override, and other cool stuffs (?).

What is the purpose of this change/feature? Why?

Working with the manifest override (or manifest in general) SUCKS BALLS!?

(OPTIONAL) Example implementations

No response

(OPTIONAL) Contact Details

No response

Verify canary release

Code of Conduct

Kaan0200 commented 2 years ago

This would be really helpful when using plasmo within the nx monorepo. The nx monorepo keeps a single package.json at the repo-root to keep packages and versions aligned, along with caching various aspects of the repo.

Having the plasmo manifest overrides living in a different file would allow me to integrate plasmo into an nx monorepo a bit more effectively.

pd4d10 commented 1 year ago

Override entry file paths

Looking forward to this feature. This would also make #356 more flexible, to support any extension the users want.

louisgv commented 1 year ago

https://github.com/radarsu/ts-import

louisgv commented 1 year ago

https://github.com/egoist/tsup/blob/dev/src/load.ts

louisgv commented 1 year ago

https://discord.com/channels/946290204443025438/1106847587560063096

aiktb commented 4 months ago

Would very much like to pull the plasmo-related stuff out of package.json 🙏

  1. package.json doesn't support code comments
  2. plasmo.config.ts allows developers to use the chrome.runtime.ManifestV3 type in @types/chrome for faster error detection. It is also possible to export the type of a custom command to use it in service_worker.