Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
whevether committed Dec 4, 2023
1 parent 25148ae commit 58e2223
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 23 deletions.
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-redux": "^8.1.3",
"react-router-dom": "^6.19.0",
"redux": "^4.2.1",
"react-redux": "^9.0.0",
"react-router-dom": "^6.20.1",
"redux": "^5.0.0",
"redux-first-history": "^5.1.1",
"redux-thunk": "^2.4.2"
"redux-thunk": "^3.1.0"
},
"devDependencies": {
"@babel/cli": "^7.23.0",
"@babel/core": "^7.23.3",
"@babel/cli": "^7.23.4",
"@babel/core": "^7.23.5",
"@babel/eslint-parser": "^7.23.3",
"@babel/plugin-syntax-async-generators": "^7.8.4",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-transform-arrow-functions": "^7.23.3",
"@babel/plugin-transform-async-generator-functions": "^7.23.3",
"@babel/plugin-transform-async-generator-functions": "^7.23.4",
"@babel/plugin-transform-async-to-generator": "^7.23.3",
"@babel/plugin-transform-class-properties": "^7.23.3",
"@babel/plugin-transform-json-strings": "^7.23.3",
"@babel/plugin-transform-optional-chaining": "^7.23.3",
"@babel/plugin-transform-json-strings": "^7.23.4",
"@babel/plugin-transform-optional-chaining": "^7.23.4",
"@babel/plugin-transform-react-constant-elements": "^7.23.3",
"@babel/plugin-transform-runtime": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@babel/plugin-transform-runtime": "^7.23.4",
"@babel/preset-env": "^7.23.5",
"@babel/preset-react": "^7.23.3",
"@babel/runtime": "^7.23.2",
"@babel/runtime": "^7.23.5",
"@loadable/component": "^5.15.3",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@vitejs/plugin-react": "^4.2.0",
Expand All @@ -74,7 +74,7 @@
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "5.0.1",
"enzyme": "^3.11.0",
"eslint": "^8.54.0",
"eslint": "^8.55.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-react": "^7.33.2",
"eslint-watch": "^8.0.0",
Expand All @@ -93,8 +93,8 @@
"sass": "^1.69.5",
"sass-loader": "^13.3.2",
"style-loader": "^3.3.3",
"unplugin-auto-import": "^0.16.7",
"vite": "^5.0.0",
"unplugin-auto-import": "^0.17.2",
"vite": "^5.0.5",
"vite-plugin-compression2": "^0.11.0",
"vite-plugin-cdn2": "^0.15.2",
"vite-plugin-svg-icons": "^2.0.1",
Expand Down
6 changes: 4 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@
##### (2023.07.22)
1. 添加vite 配置
2. 完善vite 配置
##### (2023.12.04)
1. 升级redux 依赖
##### 示例图片
[![示例图片](./screen/1.gif) "示例图片")](https://react.keep-wan.me "示例")
[![示例图片](./screen/1.gif) "示例图片")](https://react.zytravel.shop "示例")
#演示
[演示](https://react.keep-wan.me "演示")
[演示](https://react.zytravel.shop "演示")
##### npm 8 安装命令
`npm i --legacy-peer-deps`
4 changes: 2 additions & 2 deletions src/store/configureStore.dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import {createStore, compose, applyMiddleware} from 'redux';
import thunkMiddleware from 'redux-thunk';
import {withExtraArgument} from 'redux-thunk';
import rootReducer from './reducers';
import {request} from 'utils/request';
import { createReduxHistoryContext } from "redux-first-history";
Expand Down Expand Up @@ -29,7 +29,7 @@ export default function configureStore(history,initialState) {
});
const middlewares = [
routerMiddleware,
thunkMiddleware.withExtraArgument(request(history)),
withExtraArgument(request(history)),
];
const store = createStore(rootReducer(routerReducer), initialState, compose(
applyMiddleware(...middlewares)
Expand Down
4 changes: 2 additions & 2 deletions src/store/configureStore.prod.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createStore, compose, applyMiddleware} from 'redux';
import thunkMiddleware from 'redux-thunk';
import {withExtraArgument} from 'redux-thunk';
import rootReducer from './reducers';
import {request} from 'utils/request';
import { createReduxHistoryContext } from "redux-first-history";
Expand Down Expand Up @@ -28,7 +28,7 @@ export default function configureStore(history,initialState) {
});
const middlewares = [
routerMiddleware,
thunkMiddleware.withExtraArgument(request(history)),
withExtraArgument(request(history)),
];
const store = createStore(rootReducer(routerReducer), initialState, compose(
applyMiddleware(...middlewares)
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin'); //生成html并注入
const CopyWebpackPlugin = require('copy-webpack-plugin'); //拷贝资源文件
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const AutoImport = require('unplugin-auto-import/webpack');
const config = {
resolve: {
extensions: ['*', '.js', '.jsx', '.json'],
Expand Down Expand Up @@ -63,7 +64,7 @@ const config = {
allowCollectingMemory: true,
},
plugins: [
require('unplugin-auto-import/webpack')({
AutoImport.default({
imports: ["react","react-router-dom"],
}),
new ReactRefreshWebpackPlugin({overlay: false}),
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin"); //打包压缩c
const HtmlWebpackPlugin = require('html-webpack-plugin'); //生成html并注入
const CopyWebpackPlugin = require('copy-webpack-plugin'); //拷贝资源文件
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const AutoImport = require('unplugin-auto-import/webpack');
const path = require('path');
// 设置node.js生产环境变量
const GLOBALS = {
Expand Down Expand Up @@ -109,7 +110,7 @@ const config = {
allowCollectingMemory: true,
},
plugins: [
require('unplugin-auto-import/webpack')({
AutoImport.default({
imports: ["react","react-router-dom"],
}),
// 编译环境变量
Expand Down

0 comments on commit 58e2223

Please sign in to comment.