There have been numerous discussions about the distinction between dependency
and devDependency
, but none specifically address this topic in relation to svelte. So, let's dive into it here.
In many svelte packages like svelte-material-ui or svelte-routing, the instructions recommend installing the package as a dependency
. However, since svelte compiles these packages during build time, any new library using them does not need to install the svelte package. This raises the question of why it is required as a dependency
.
This may be subjective, but it would be beneficial to get some insights on the preferable approach.