Open simplenotezy opened 4 years ago
@simplenotezy Good question! By definition dev dependencies are only loaded during development and aren't necessary in production because all of our scripts are getting compiled into the dist directory during a production build process.
OK I see. Then in theory, "vue" and "axios" could also be loaded as a dev dependency?
dependencies and devDependencies are designed for node.js package (that is, for server side in common applications). If the application are bundled by webpack, everything are actually required and collected by webpack at the building process. And in runtime(i.e. on a browser), the bundle doesn't depend on any node.js package. So yes, things you mentioned can be dev dependencies in this case (if you weren't building bundles in production node environment).
A detailed explaination can be found here
I noticed vuex, vue-routing and more is loaded as a dev dependency. Is this on purpose, and if so, which?