4 thoughts on “Custom loaders directory aka resolveLoader for webpack2?

  1. @Kovensky Thanks man! That fixed it.

       resolveLoader: {
          // An array of directory names to be resolved to the current directory
          modules: ['node_modules', 'node_modules_custom', helpers.root('src')],
       },
    
  2. One more Question: When should we use resolve.modules vs resolveLoader.modules?
    What is the difference?

  3. @Kovensky may I know specifically what do you mean by that? Isn’t it the same, i.e. isn’t the rename of options in resolveLoaders the same as resolve ?

    Webpack 1

    config.resolve = {
        modulesDirectories: [
            nodeModulesDir,
        ],
    };

    Webpack 2

    config.resolve = {
        modules: [
            nodeModulesDir,
        ],
    };

Comments are closed.