@julian Thanks for the reply. Appreciate it.
Is this correct
If i want global js and css then i add it in plugin.json as css and scripts. But if i only use it in a special widget its better to include js and css in the templaye file.
@Jenkler CSS, maybe. JS, no. Use a requirejs module with modules hash in plugin.json if you have js that's used sparingly.
If it's small js, it'll be easier to just include it in the main plugin.json scripts.