Skip to content

Commit aed56eb

Browse files
update package
1 parent 81a8f5d commit aed56eb

5 files changed

Lines changed: 432 additions & 249 deletions

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PROD_HOST=localhost
66
PUBLIC_API_HOST=localhost:9000
77
CRYPTO_KEY=ad$cr3efW89ypg
88
SSR=true
9-
UI=chakra
9+
UI=antd
1010
MIDDLEWARE=false
1111
ANIMATE_ROUTER=false
1212
SERVER_ENTRY=./src/server/entry.ts

package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"@emotion/styled": "^11.8.1",
2222
"@loadable/component": "^5.15.2",
2323
"@loadable/server": "^5.15.2",
24-
"@mui/material": "^5.4.4",
25-
"antd": "^4.18.9",
26-
"axios": "^0.26.0",
24+
"@mui/material": "^5.5.2",
25+
"antd": "^4.19.3",
26+
"axios": "^0.26.1",
2727
"chalk": "4",
2828
"compression": "^1.7.4",
2929
"cookie-parser": "^1.4.6",
@@ -40,7 +40,7 @@
4040
"react": "^17.0.2",
4141
"react-dom": "^17.0.2",
4242
"react-helmet-async": "^1.2.3",
43-
"react-intl": "^5.24.6",
43+
"react-intl": "^5.24.7",
4444
"react-redux": "^7.2.6",
4545
"react-router": "6.2.2",
4646
"react-router-dom": "6.2.2",
@@ -53,15 +53,15 @@
5353
},
5454
"devDependencies": {
5555
"@babel/cli": "^7.17.6",
56-
"@babel/core": "^7.17.5",
56+
"@babel/core": "^7.17.8",
5757
"@babel/plugin-proposal-class-properties": "^7.16.7",
58-
"@babel/plugin-proposal-decorators": "^7.17.2",
58+
"@babel/plugin-proposal-decorators": "^7.17.8",
5959
"@babel/plugin-proposal-export-default-from": "^7.16.7",
6060
"@babel/plugin-proposal-object-rest-spread": "^7.17.3",
6161
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
6262
"@babel/plugin-proposal-private-methods": "^7.16.11",
6363
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
64-
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
64+
"@babel/plugin-transform-modules-commonjs": "^7.17.7",
6565
"@babel/plugin-transform-runtime": "^7.17.0",
6666
"@babel/preset-env": "^7.16.11",
6767
"@babel/preset-react": "^7.16.7",
@@ -78,33 +78,33 @@
7878
"@types/js-cookie": "^3.0.1",
7979
"@types/loadable__component": "^5.13.4",
8080
"@types/loadable__server": "^5.12.6",
81-
"@types/lodash": "^4.14.179",
81+
"@types/lodash": "^4.14.180",
8282
"@types/multer": "^1.4.7",
83-
"@types/node": "^17.0.21",
84-
"@types/react": "^17.0.39",
85-
"@types/react-dom": "^17.0.13",
83+
"@types/node": "^17.0.23",
84+
"@types/react": "^17.0.42",
85+
"@types/react-dom": "^17.0.14",
8686
"@types/react-redux": "^7.1.23",
8787
"@types/webpack": "^5.28.0",
8888
"@types/webpack-env": "^1.16.3",
8989
"@types/webpack-hot-middleware": "^2.25.6",
90-
"@typescript-eslint/eslint-plugin": "^5.13.0",
91-
"@typescript-eslint/parser": "^5.13.0",
92-
"autoprefixer": "^10.4.2",
90+
"@typescript-eslint/eslint-plugin": "^5.16.0",
91+
"@typescript-eslint/parser": "^5.16.0",
92+
"autoprefixer": "^10.4.4",
9393
"babel-jest": "^27.5.1",
94-
"babel-loader": "^8.2.3",
94+
"babel-loader": "^8.2.4",
9595
"babel-plugin-import": "^1.13.3",
9696
"clean-webpack-plugin": "^4.0.0",
9797
"core-js": "^3.21.1",
9898
"cross-env": "^7.0.3",
99-
"css-loader": "^6.7.0",
99+
"css-loader": "^6.7.1",
100100
"css-minimizer-webpack-plugin": "^3.4.1",
101-
"eslint": "^8.10.0",
101+
"eslint": "^8.11.0",
102102
"eslint-config-prettier": "^8.5.0",
103-
"eslint-import-resolver-typescript": "^2.5.0",
103+
"eslint-import-resolver-typescript": "^2.7.0",
104104
"eslint-plugin-import": "^2.25.4",
105105
"eslint-plugin-jsx-a11y": "^6.5.1",
106106
"eslint-plugin-prettier": "^4.0.0",
107-
"eslint-plugin-react": "^7.29.3",
107+
"eslint-plugin-react": "^7.29.4",
108108
"eslint-plugin-react-hooks": "^4.3.0",
109109
"eslint-webpack-plugin": "^3.1.1",
110110
"file-loader": "^6.2.0",
@@ -114,9 +114,9 @@
114114
"mini-css-extract-plugin": "^2.6.0",
115115
"node-sass": "^7.0.1",
116116
"nodemon": "^2.0.15",
117-
"postcss": "^8.4.7",
117+
"postcss": "^8.4.12",
118118
"postcss-loader": "^6.2.1",
119-
"prettier": "^2.5.1",
119+
"prettier": "^2.6.0",
120120
"react-refresh": "^0.11.0",
121121
"sass": "^1.49.9",
122122
"sass-loader": "^12.6.0",
@@ -128,7 +128,7 @@
128128
"webpack-dev-middleware": "^5.3.1",
129129
"webpack-dev-server": "^4.7.4",
130130
"webpack-hot-middleware": "^2.25.1",
131-
"webpack-manifest-plugin": "^4.1.1",
131+
"webpack-manifest-plugin": "^5.0.0",
132132
"webpack-merge": "^5.8.0",
133133
"webpack-node-externals": "^3.0.0"
134134
}

script/compiler.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const compilerPromise = (name, compiler, compilerConfig = {}) => {
1515
const dynamicRouter = compilerConfig.dynamicRouter ?? false;
1616
const development = compilerConfig.development ?? true;
1717
const dynamicFactory = new DynamicRouter(dynamicCache, name);
18+
if (development && dynamicRouter) {
19+
console.log(`[${name}]`, chalk.redBright("Dynamic Router enabled!, now you can create a new page under the pages folder"));
20+
}
1821
return new Promise((resolve, reject) => {
1922
compiler.hooks.compile.tap(name, () => console.log(`[${name}]`, chalk.blue(`Compiling`)));
2023
if (dynamicRouter) {

script/dev-entry.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const { startDevServer } = require("./startDevServer");
1010
const { startServerWatch } = require("./startServerWatch");
1111
const { config } = require("../webpack/webpack.config");
1212

13-
const withPromise = async () => {
13+
const withHydrate = async () => {
1414
try {
1515
await Promise.all([freePort(process.env.DEV_PORT), freePort(process.env.WDS_PORT), new DynamicRouter().getDynamicRouter()]);
1616
} catch (e) {
@@ -67,7 +67,7 @@ const withMiddleWare = async () => {
6767
const [_, serverConfig] = multiConfig;
6868
const serverCompiler = webpack(serverConfig);
6969
const serverPromise = compilerPromise("server", serverCompiler);
70-
serverCompiler.run()
70+
serverCompiler.run();
7171
try {
7272
await serverPromise;
7373
} catch (e) {
@@ -98,6 +98,6 @@ exports.start = () => {
9898
if (isMiddleWareDevelop) {
9999
withMiddleWare();
100100
} else {
101-
withPromise();
101+
withHydrate();
102102
}
103103
};

0 commit comments

Comments
 (0)