From 16a2020c17da15da9d7d135c13050db7a8a54dd9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 23 Nov 2022 19:31:19 +0100 Subject: [PATCH 1/2] remove the fix we added when enhanced-resolve was broken for us --- code/lib/cli/src/link.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/code/lib/cli/src/link.ts b/code/lib/cli/src/link.ts index 99af176a9638..1e08054d9fed 100644 --- a/code/lib/cli/src/link.ts +++ b/code/lib/cli/src/link.ts @@ -51,12 +51,6 @@ export const link = async ({ target, local, start }: LinkOptions) => { logger.info(`Linking ${reproDir}`); await exec(`yarn link --all ${storybookDir}`, { cwd: reproDir }); - // TODO remove this once https://github.com/webpack/enhanced-resolve/issues/362 is resolved - const packageJsonPath = path.join(reproDir, 'package.json'); - const packageJson = await readJSON(packageJsonPath); - packageJson.resolutions = { ...packageJson.resolutions, 'enhanced-resolve': '~5.10.0' }; - await writeJSON(packageJsonPath, packageJson, { spaces: 2 }); - logger.info(`Installing ${reproName}`); await exec(`yarn install`, { cwd: reproDir }); From a14d905ca3edc20d33383413b1801810ca3ce2fe Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 23 Nov 2022 19:33:27 +0100 Subject: [PATCH 2/2] cleanup --- code/lib/cli/src/link.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/cli/src/link.ts b/code/lib/cli/src/link.ts index 1e08054d9fed..8b48064f5abc 100644 --- a/code/lib/cli/src/link.ts +++ b/code/lib/cli/src/link.ts @@ -1,4 +1,4 @@ -import fse, { readJSON, writeJSON } from 'fs-extra'; +import fse from 'fs-extra'; import path from 'path'; import { sync as spawnSync } from 'cross-spawn'; import { logger } from '@storybook/node-logger';