Skip to content

Commit

Permalink
Merge pull request #17705 from storybookjs/fix-pnp-tests
Browse files Browse the repository at this point in the history
Addon-docs: Fix dependencies for yarn pnp
  • Loading branch information
shilman committed Apr 1, 2022
2 parents d3b4566 + bfbb086 commit ab1edc8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
17 changes: 3 additions & 14 deletions addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"@storybook/source-loader": "6.5.0-alpha.52",
"@storybook/store": "6.5.0-alpha.52",
"@storybook/theming": "6.5.0-alpha.52",
"babel-loader": "^8.0.0",
"core-js": "^3.8.2",
"fast-deep-equal": "^3.1.3",
"global": "^4.4.0",
Expand All @@ -86,23 +87,14 @@
"devDependencies": {
"@babel/core": "^7.12.10",
"@storybook/mdx2-csf": "canary",
"@types/util-deprecate": "^1.0.0",
"babel-loader": "^8.0.0",
"webpack": "4"
"@types/util-deprecate": "^1.0.0"
},
"peerDependencies": {
"@storybook/mdx2-csf": "*",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0",
"webpack": "*"
"react-dom": "^16.8.0 || ^17.0.0"
},
"peerDependenciesMeta": {
"@storybook/builder-webpack4": {
"optional": true
},
"@storybook/builder-webpack5": {
"optional": true
},
"@storybook/mdx2-csf": {
"optional": true
},
Expand All @@ -111,9 +103,6 @@
},
"react-dom": {
"optional": true
},
"webpack": {
"optional": true
}
},
"publishConfig": {
Expand Down
13 changes: 2 additions & 11 deletions addons/docs/src/frameworks/common/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import remarkSlug from 'remark-slug';
import remarkExternalLinks from 'remark-external-links';
import global from 'global';

import type { BuilderConfig, Options } from '@storybook/core-common';
import type { Options } from '@storybook/core-common';
import { logger } from '@storybook/node-logger';

// for frameworks that are not working with react, we need to configure
Expand Down Expand Up @@ -38,16 +38,7 @@ export async function webpack(
typeof createCompiler
>[0] */
) {
const { builder = 'webpack4' } = await options.presets.apply<{
builder: BuilderConfig;
}>('core', {} as any);

const builderName = typeof builder === 'string' ? builder : builder.name;
const resolvedBabelLoader = require.resolve('babel-loader', {
paths: builderName.match(/^webpack(4|5)$/)
? [require.resolve(`@storybook/builder-${builderName}`)]
: [builderName],
});
const resolvedBabelLoader = require.resolve('babel-loader');

const { module = {} } = webpackConfig;

Expand Down
8 changes: 0 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6334,25 +6334,17 @@ __metadata:
remark-slug: ^6.0.0
ts-dedent: ^2.0.0
util-deprecate: ^1.0.2
webpack: 4
peerDependencies:
"@storybook/mdx2-csf": "*"
react: ^16.8.0 || ^17.0.0
react-dom: ^16.8.0 || ^17.0.0
webpack: "*"
peerDependenciesMeta:
"@storybook/builder-webpack4":
optional: true
"@storybook/builder-webpack5":
optional: true
"@storybook/mdx2-csf":
optional: true
react:
optional: true
react-dom:
optional: true
webpack:
optional: true
languageName: unknown
linkType: soft

Expand Down

0 comments on commit ab1edc8

Please sign in to comment.