emulsify-ds / emulsify-drupal

Drupal theme built with Storybook and Webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

  1. We updated all the Storybook components to version 6.4.14.
  2. We changed Webpack to version 5 and added packages @storybook/builder-webpack5 and @storybook/manager-webpack5.
  3. 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 with staticDirs: ['../dist', '../images'],. We also added the information for the webpack builder to this file.
  4. We removed maintained node versions from the .browserslistrc file to get around a compilation error.
  5. 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.

┆Issue is synchronized with this Clickup by Unito

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.