Updating Storybook to handle security vulnerabilities in NPM
HeikkiYlipaavalniemi opened this issue · comments
The current Storybook version has multiple security vulnerabilities which are fixed in the newer Storybook version.
We updated our Storybooks to a newer version and I thought I'd share what we did if someone else finds it useful.
- We updated all the Storybook components to version 6.4.14.
- We changed Webpack to version 5 and added packages @storybook/builder-webpack5 and @storybook/manager-webpack5.
- We changed the default Storybook build command and removed the deprecated
-s
flag. The static directories are now defined in the .storybook/main.js file withstaticDirs: ['../dist', '../images'],
. We also added the information for the webpack builder to this file. - We removed
maintained node versions
from the.browserslistrc
file to get around a compilation error. - In babel.config.js we changed the minify setting to
['minify', {
builtIns: false,
}],
Also related to #242 we disabled the Imagemin plugin for now and plan to find a better alternative to it.
Just noticed that Storybook 7 was released 2023-03-31.
There's already some dot releases but should address the multiple security vulnerabilities of earlier releases.
Not sure if this version is on emulsifiers roadmap.