Skip to content

Commit

Permalink
Restore webpack as a dependency, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-mcdougle committed Jan 11, 2022
1 parent 0f36cb7 commit 29c4627
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
11 changes: 11 additions & 0 deletions MIGRATION.md
Expand Up @@ -607,6 +607,17 @@ yarn add webpack@5 --dev
npm install webpack@5 --save-dev
```
Alternatively or additionally you might need to add a resolution to your package.json to ensure that a consistent webpack version is provided across all of storybook packages. Replacing the {app} with the app (react, vue, etc.) that you're using:
```js
// package.json
...
resolutions: {
"@storybook/{app}/webpack": "^5"
}
...
```
### Angular 12 upgrade
Storybook 6.3 supports Angular 12 out of the box when you install it fresh. However, if you're upgrading your project from a previous version, you'll need to [follow the steps for opting-in to webpack 5](#webpack-5).
Expand Down
6 changes: 3 additions & 3 deletions app/react/package.json
Expand Up @@ -69,12 +69,12 @@
"react-refresh": "^0.11.0",
"read-pkg-up": "^7.0.1",
"regenerator-runtime": "^0.13.7",
"ts-dedent": "^2.0.0"
"ts-dedent": "^2.0.0",
"webpack": ">=4.43.0 <6.0.0"
},
"devDependencies": {
"@storybook/client-api": "6.5.0-alpha.14",
"@types/prompts": "^2.0.9",
"@types/webpack": "*"
"@types/prompts": "^2.0.9"
},
"peerDependencies": {
"@babel/core": "^7.11.5",
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Expand Up @@ -10770,7 +10770,6 @@ __metadata:
"@storybook/store": 6.5.0-alpha.14
"@types/node": ^14.14.20 || ^16.0.0
"@types/prompts": ^2.0.9
"@types/webpack": "*"
"@types/webpack-env": ^1.16.0
babel-plugin-add-react-displayname: ^0.0.5
babel-plugin-named-asset-import: ^0.3.1
Expand All @@ -10783,6 +10782,7 @@ __metadata:
read-pkg-up: ^7.0.1
regenerator-runtime: ^0.13.7
ts-dedent: ^2.0.0
webpack: ">=4.43.0 <6.0.0"
peerDependencies:
"@babel/core": ^7.11.5
react: ^16.8.0 || ^17.0.0
Expand Down Expand Up @@ -49163,7 +49163,7 @@ resolve@1.19.0:
languageName: node
linkType: hard

"webpack@npm:4, webpack@npm:^4.0.0":
"webpack@npm:4, webpack@npm:>=4.43.0 <6.0.0, webpack@npm:^4.0.0":
version: 4.46.0
resolution: "webpack@npm:4.46.0"
dependencies:
Expand Down

0 comments on commit 29c4627

Please sign in to comment.