Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
name: require(path.join(__dirname, '..', directory, 'package.json')).name,
directory: path.join(__dirname, '..', directory)
}))
for (const { name } of localPackages) {
redefine[name] = `http://${address}:${port}/${safeName(name)}.tgz`
}
let isResolveMonorepo = false
try {
isResolveMonorepo = require('../../../package').name === 'resolve'
} catch (e) {}
if (isResolveMonorepo) {
// eslint-disable-next-line import/no-extraneous-dependencies
const resolvePackagesNames = require('create-resolve-app').resolvePackages
// 4. Remove all resolve packages in node_modules
for (const { directory } of localPackages) {
for (const name of resolvePackagesNames) {
const resolvePackagePath = path.normalize(
path.join(directory, 'node_modules', name)
)
if (fs.existsSync(resolvePackagePath)) {
removeExtra(resolvePackagePath)
}
}
}
resolvePackages.push(
...resolvePackagesNames.map(packageName => ({