Skip to content

Commit e461d95

Browse files
authored
Merge pull request #170 from UgnisSoftware/UGN-353-v2
refactor UGN-353: Upgrade to react v18
2 parents 5ec4244 + 9b80ca9 commit e461d95

25 files changed

Lines changed: 12999 additions & 33288 deletions

.babelrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"sourceType": "unambiguous",
3+
"presets": [
4+
[
5+
"@babel/preset-env",
6+
{
7+
"targets": {
8+
"chrome": 100
9+
}
10+
}
11+
],
12+
"@babel/preset-typescript",
13+
"@babel/preset-react"
14+
],
15+
"plugins": []
16+
}

.storybook/main.ts

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
1-
const path = require("path")
2-
3-
const toPath = (_path: string) => path.join(process.cwd(), _path)
4-
5-
module.exports = {
6-
stories: ["../src/**/stories/*.stories.tsx"],
7-
webpackFinal: async (config: any) => {
8-
config.module.rules.push({
9-
test: /\.mjs$/,
10-
include: /node_modules/,
11-
type: "javascript/auto",
12-
})
13-
return {
14-
...config,
15-
devtool: "inline-source-map",
16-
resolve: {
17-
...config.resolve,
18-
alias: {
19-
...config.resolve.alias,
20-
"@emotion/core": toPath("node_modules/@emotion/react"),
21-
"emotion-theming": toPath("node_modules/@emotion/react"),
22-
},
23-
},
24-
}
1+
import type { StorybookConfig } from "@storybook/react-webpack5"
2+
const config: StorybookConfig = {
3+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
4+
addons: ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions"],
5+
framework: {
6+
name: "@storybook/react-webpack5",
7+
options: {},
8+
},
9+
docs: {
10+
autodocs: "tag",
2511
},
26-
staticDirs: ["../src/stories/static"],
2712
}
13+
export default config

.storybook/preview.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { Preview } from "@storybook/react"
2+
3+
const preview: Preview = {
4+
parameters: {
5+
actions: { argTypesRegex: "^on[A-Z].*" },
6+
controls: {
7+
matchers: {
8+
color: /(background|color)$/i,
9+
date: /Date$/,
10+
},
11+
},
12+
},
13+
}
14+
15+
export default preview

0 commit comments

Comments
 (0)