Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the fix we added when enhanced-resolve was broken for us #19942

Merged
merged 2 commits into from
Nov 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions code/lib/cli/src/link.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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 });

Expand Down