Skip to content

Commit

Permalink
Merge pull request #6114 from mozilla/react-18
Browse files Browse the repository at this point in the history
Upgrade client to React 18 (and upgrade dependencies).
  • Loading branch information
nikk15 authored Jun 14, 2023
2 parents b8a4e51 + 40ec350 commit d0c6eb8
Show file tree
Hide file tree
Showing 35 changed files with 19,620 additions and 49,300 deletions.
15 changes: 7 additions & 8 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
const path = require("path");

const fs = require("fs");

const themesPath = path.resolve(__dirname, "..", "themes.json");

if (fs.existsSync(themesPath)) {
const appConfig = {};
const themesString = fs.readFileSync(themesPath).toString();
appConfig.theme = {};
appConfig.theme.themes = JSON.parse(themesString);
process.env.STORYBOOK_APP_CONFIG = JSON.stringify(appConfig);
}

module.exports = {
stories: ["../src/react-components/**/*.stories.mdx", "../src/react-components/**/*.stories.js"],
addons: ["@storybook/addon-links", "@storybook/addon-essentials", "storybook-addon-designs"],
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
webpackFinal: async config => {
config.module.rules.push({
test: /\.scss$/,
Expand Down Expand Up @@ -44,7 +40,9 @@ module.exports = {
loader: "@svgr/webpack",
options: {
titleProp: true,
replaceAttrValues: { "#000": "currentColor" },
replaceAttrValues: {
"#000": "currentColor"
},
exportType: "named",
svgo: true,
svgoConfig: {
Expand Down Expand Up @@ -73,7 +71,8 @@ module.exports = {
});
return config;
},
core: {
builder: "webpack5"
framework: {
name: "@storybook/react-webpack5",
options: {}
}
};
Loading

0 comments on commit d0c6eb8

Please sign in to comment.