plasmo icon indicating copy to clipboard operation
plasmo copied to clipboard

[RFC] plasmo.config.ts

Open louisgv opened this issue 2 years ago • 6 comments

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

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

  • Override build destination paths
  • Override entry file paths (https://discord.com/channels/946290204443025438/1022829061476728852/1022829065826205706)
  • Override manifest file (WITH TYPING!)
  • Compose CSP with typing/linting than just raw string

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

  • [X] I verified that the issue exists in plasmo canary release

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct
  • [X] I checked the current issues for duplicate problems.

louisgv avatar Aug 31 '22 01:08 louisgv

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.

Kaan0200 avatar Sep 23 '22 15:09 Kaan0200

Override entry file paths

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

pd4d10 avatar Dec 31 '22 06:12 pd4d10

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

louisgv avatar Jan 27 '23 23:01 louisgv

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

louisgv avatar May 20 '23 09:05 louisgv

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

louisgv avatar May 20 '23 22:05 louisgv

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.

aiktb avatar Jun 22 '24 03:06 aiktb