plasmo
plasmo copied to clipboard
[RFC] plasmo.config.ts
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.
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.
Override entry file paths
Looking forward to this feature. This would also make #356 more flexible, to support any extension the users want.
https://github.com/radarsu/ts-import
https://github.com/egoist/tsup/blob/dev/src/load.ts
https://discord.com/channels/946290204443025438/1106847587560063096
Would very much like to pull the plasmo-related stuff out of package.json
🙏
-
package.json
doesn't support code comments -
plasmo.config.ts
allows developers to use thechrome.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.