Skip to content

Commit

Permalink
feat(react-ui): update babel and webpack (#3411)
Browse files Browse the repository at this point in the history
  • Loading branch information
HelenaIsh authored Apr 24, 2024
1 parent 43d2a02 commit cce656b
Show file tree
Hide file tree
Showing 5 changed files with 2,121 additions and 146 deletions.
7 changes: 3 additions & 4 deletions packages/react-ui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require('path');

module.exports = {
core: {
builder: 'webpack5',
},
addons: [
'creevey',
'creevey/preset/ie11',
Expand All @@ -26,9 +27,7 @@ module.exports = {
test: /@remix-run|react-router/,
loader: 'babel-loader',
options: {
babelrc: false,
envName: 'cjs',
extends: path.join(__dirname, '../.babelrc.js'),
},
});
return config;
Expand Down
6 changes: 3 additions & 3 deletions packages/react-ui/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const path = require('path');
const webpack = require('webpack');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const isTestEnv = Boolean(process.env.STORYBOOK_REACT_UI_TEST);

module.exports = async ({ config, mode }) => {
module.exports = async ({ config }) => {
config.devtool = 'eval-source-map';

if (isTestEnv) {
Expand Down Expand Up @@ -31,7 +30,7 @@ module.exports = async ({ config, mode }) => {
},
{
test: /\.css$/,
loaders: [
use: [
'style-loader',
{
loader: 'dts-css-modules-loader',
Expand All @@ -45,6 +44,7 @@ module.exports = async ({ config, mode }) => {
modules: {
mode: 'global',
localIdentName: '[name]-[local]-[hash:base64:4]',
namedExport: false,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/react-ui/.styleguide/config/base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const webpackConfig = {
},
{
test: /\.css$/,
loaders: [
use: [
'style-loader',
{
loader: 'dts-css-modules-loader',
Expand All @@ -195,7 +195,7 @@ const webpackConfig = {
],
},
devServer: {
public: 'localhost.testkontur.ru',
host: 'localhost.testkontur.ru',
},
};

Expand Down
36 changes: 19 additions & 17 deletions packages/react-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
"warning": "^4.0.3"
},
"devDependencies": {
"@babel/core": "^7.16.5",
"@babel/plugin-proposal-class-properties": "^7.16.5",
"@babel/plugin-proposal-decorators": "7.16.5",
"@babel/plugin-transform-runtime": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"@babel/preset-react": "^7.16.5",
"@babel/preset-typescript": "7.16.5",
"@babel/core": "^7.24.4",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.24.1",
"@babel/plugin-transform-runtime": "^7.24.3",
"@babel/preset-env": "^7.24.4",
"@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1",
"@babel/register": "^7.16.5",
"@cfaester/enzyme-adapter-react-18": "^0.7.1",
"@skbkontur/icons": "1.5.1",
Expand All @@ -85,6 +85,8 @@
"@storybook/addon-essentials": "6.4.22",
"@storybook/addon-ie11": "0.0.6",
"@storybook/addon-links": "6.4.22",
"@storybook/builder-webpack5": "^6.4.22",
"@storybook/manager-webpack5": "^6.5.16",
"@storybook/react": "6.4.22",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "15.0.2",
Expand All @@ -106,24 +108,24 @@
"@types/shallowequal": "^1.1.1",
"@types/warning": "^3.0.0",
"axios": "^0.24.0",
"babel-jest": "27.4.5",
"babel-loader": "^8.2.3",
"babel-jest": "29.7.0",
"babel-loader": "^9.1.3",
"chalk": "4.1.0",
"copyfiles": "^2.4.1",
"core-js": "^3.20.1",
"core-js": "^3.37.0",
"creevey": "0.8.2-fix-wait.2",
"cross-env": "^7.0.3",
"css-loader": "^5.2.7",
"css-loader": "^7.1.1",
"dotenv": "^10.0.0",
"dts-css-modules-loader": "1.2.4",
"dts-css-modules-loader": "^2.0.1",
"enzyme": "^3.11.0",
"eslint-plugin-jest": "28.2.0",
"eslint-plugin-jest-dom": "^5.2.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-storybook": "^0.5.6",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-testing-library": "^6.2.2",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^6.5.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"fs-extra": "^10.0.0",
"fs-readdir-recursive": "^1.1.0",
"gh-pages": "^3.2.3",
Expand All @@ -137,18 +139,18 @@
"react": "18.2.0",
"react-docgen-typescript": "^2.2.2",
"react-dom": "^18.2.0",
"react-styleguidist": "^11.1.7",
"react-styleguidist": "^12.0.1",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"serve": "^13.0.2",
"style-loader": "^2.0.0",
"style-loader": "^4.0.0",
"stylelint": "^14.2.0",
"stylelint-config-standard": "^24.0.0",
"typescript": "4.5.4",
"upath": "^2.0.1",
"url-loader": "^4.1.1",
"wait-on": "^6.0.0",
"webpack": "^4.41.2"
"webpack": "^5.91.0"
},
"peerDependencies": {
"react": ">=17.0.2",
Expand Down
Loading

0 comments on commit cce656b

Please sign in to comment.