npm: dependencies vs devDependencies with bundled dependencies

Viewed 2985

Using the search I already found some great answers to similar questions, but still I am not sure if I understood it correctly.

From these answers I learned that dependencies are required to run the application while devDependencies are only required while developing (like unit tests).

But how about this: My application depends on jQuery, but during a build step (with the help of my devDependencies), everything is bundled into one file. In this case, should I list jQuery as dependency or as devDependency?

To make my point more clear take a module like this:

define(['jquery'], function($) {
  // use jQuery in this module
})

Later on, this module will be compiled into somehing like application.build.js which then contains this module and the jQuery dependency.

1 Answers
Related