-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Yarn 2: Fix dependencies issues for compatibility #10613
Changes from all commits
f2da615
a70f6d8
39a44fe
da48248
1c3621a
4a5d710
d44ff25
45b1601
6a379e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ export function webpack(webpackConfig: any = {}, options: any = {}) { | |
include: new RegExp(`node_modules\\${path.sep}acorn-jsx`), | ||
use: [ | ||
{ | ||
loader: 'babel-loader', | ||
loader: require.resolve('babel-loader'), | ||
options: { | ||
presets: [[require.resolve('@babel/preset-env'), { modules: 'commonjs' }]], | ||
}, | ||
|
@@ -77,11 +77,11 @@ export function webpack(webpackConfig: any = {}, options: any = {}) { | |
test: /\.(stories|story).mdx$/, | ||
use: [ | ||
{ | ||
loader: 'babel-loader', | ||
loader: require.resolve('babel-loader'), | ||
options: createBabelOptions(babelOptions, configureJSX), | ||
}, | ||
{ | ||
loader: '@mdx-js/loader', | ||
loader: require.resolve('@mdx-js/loader'), | ||
options: { | ||
compilers: [createCompiler(options)], | ||
...mdxLoaderOptions, | ||
|
@@ -94,11 +94,11 @@ export function webpack(webpackConfig: any = {}, options: any = {}) { | |
exclude: /\.(stories|story).mdx$/, | ||
use: [ | ||
{ | ||
loader: 'babel-loader', | ||
loader: require.resolve('babel-loader'), | ||
options: createBabelOptions(babelOptions, configureJSX), | ||
}, | ||
{ | ||
loader: '@mdx-js/loader', | ||
loader: require.resolve('@mdx-js/loader'), | ||
options: mdxLoaderOptions, | ||
}, | ||
], | ||
|
@@ -112,7 +112,7 @@ export function webpack(webpackConfig: any = {}, options: any = {}) { | |
result.plugins.push( | ||
new DllReferencePlugin({ | ||
context, | ||
manifest: path.join(coreDirName, 'dll', 'storybook_docs-manifest.json'), | ||
manifest: require.resolve('@storybook/core/dll/storybook_docs-manifest.json'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good question 🤔 I guess so, I based my change on what is done at L10: https://github.com/storybookjs/storybook/pull/10613/files#diff-3f9960d4367e0d7176bea0f6d79a54e7R10 I only have Unix computers so I can't directly test. However, the previous version was written by @tooppaaa and I think he is working on Windows so maybe he can give it a try and let us know if it works 😇. @tooppaaa if you have time can you: git checkout fix-deps
yarn bootstrap --core
cd examples/official-storybook
yarn STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./ Then let us know if SB has started properly and if stories related to addon docs are working fine. 🙇 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this works on windows, this would resolve to a path with the slashes in the wrong direction, as is how windows likes it. 🤷♂️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All good ! IE included ;) |
||
}) | ||
); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,6 @@ | |
}, | ||
"peerDependencies": { | ||
"@babel/core": "*", | ||
"babel-loader": "^7.0.0 || ^8.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! this means we can remove some documentation too, I think we tell users to install this? |
||
"rax": "^0.4.0 || ^1.0.0", | ||
"react": "*", | ||
"react-dom": "*" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this will do nothing in yarn 2?