Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if(fs.existsSync(path.resolve(options.projectRootPath, 'node_modules', 'pellet', 'node_modules', 'messageformat'))) {
externalDependencies.messageformat = path.join('pellet', 'node_modules', 'messageformat');
} else {
externalDependencies.messageformat = path.resolve(__dirname, '..', 'node_modules', 'messageformat');
}
if(fs.existsSync(path.resolve(options.projectRootPath, 'node_modules', 'pellet', 'node_modules', 'superagent'))) {
externalDependencies.superagent = path.join('pellet', 'node_modules', 'superagent');
} else {
externalDependencies.superagent = path.resolve(__dirname, '..', 'node_modules', 'superagent');
}
if (fs.existsSync(path.resolve(options.projectRootPath, 'node_modules', 'pellet', 'node_modules', 'mobile-detect', 'mobile-detect.min.js'))) {
externalDependencies['mobile-detect/mobile-detect.min.js'] = path.join('pellet', 'node_modules', 'mobile-detect', 'mobile-detect.min.js');
} else {
externalDependencies['mobile-detect/mobile-detect.min.js'] = path.resolve(__dirname, '..', 'node_modules', 'mobile-detect', 'mobile-detect.min.js');
}
} else {
externalDependencies = {
React: 'react/addons',
react: 'react/addons',
intl: 'intl',
superagent:'superagent',
messageformat: 'messageformat',
ejs: 'ejs'
};
//if (!fs.existsSync(path.resolve(__dirname, '..', 'node_modules', 'mobile-detect', 'mobile-detect.min.js'))) {
// externalDependencies['mobile-detect/mobile-detect.min.js'] = path.resolve(__dirname, '..', 'node_modules', 'mobile-detect', 'mobile-detect.min.js');
//}