We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d6fe14 commit 139b75fCopy full SHA for 139b75f
packages/utils/modify-config-helper.ts
@@ -67,13 +67,11 @@ export default function modifyHelperUtil(
67
autoSetDefaults
68
})
69
.then((): void => {
70
- let configModule: object, packageJson: { name: string };
+ let configModule: object;
71
try {
72
const confPath = path.resolve(process.cwd(), ".yo-rc.json");
73
configModule = require(confPath);
74
- const packageJsonPath = path.resolve(process.cwd(), "package.json");
75
- packageJson = require(packageJsonPath);
76
- const packageName: string = packageJson.name;
+ const packageName: string = require(path.resolve(process.cwd(), "package.json")).name;
77
78
// Change structure of the config to be transformed
79
const tmpConfig: object = {};
0 commit comments