UNPKG

363 BJavaScriptView Raw
1let { dirname, join } = require('path')
2
3module.exports = function convertConfig(config, root) {
4 let resolveModulesPaths = [join(dirname(root), 'node_modules')]
5 if (!config.resolveLoader) config.resolveLoader = {}
6 if (!config.resolve) config.resolve = {}
7 config.resolveLoader.modules = resolveModulesPaths
8 config.resolve.modules = resolveModulesPaths
9}