# Overriding plugin javascript in a theme component

**URL:** <https://meta.discourse.org/t/overriding-plugin-javascript-in-a-theme-component/213748>\
**Category:** Development\
**Created:** [January 3, 2022, 8:42pm UTC](https://meta.discourse.org/t/overriding-plugin-javascript-in-a-theme-component/213748 "2022-01-03T20:42:28Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [January 5, 2022, 3:24pm UTC](https://meta.discourse.org/t/overriding-plugin-javascript-in-a-theme-component/213748/4 "2022-01-05T15:24:04Z")

</div>

> [@david](#):
>
> IMO it would be better to decide between theme-component/plugin, and then go all-in.

I agree in general, however, there are some edge cases:

1. Where the volume of changes to the javascript far outweighs the changes to the back-end, in which case Theme Components are a great way to deploy and test-deploy code FAST.

2. Where most of the functionality can be delivered in the base Theme Component but adding a complementary plugin can add additional features not possible in Javascript alone. I employ this technique in Topic List Previews, where the Component does 90% of what the add-on is capable of, but if you also add in the plugin, you get some additional cool stuff.

That said, packaging everything in a plugin makes sense as there is less confusion on configuration & installation and everything is always kept in step.

---

_[View the full topic](https://meta.discourse.org/t/overriding-plugin-javascript-in-a-theme-component/213748)._
