Skip to content
This repository was archived by the owner on Jul 2, 2022. It is now read-only.

Commit 8dd0351

Browse files
committed
修复react-webpack模板无法代理请求问题
1 parent 987dfb0 commit 8dd0351

File tree

12 files changed

+141
-63
lines changed

12 files changed

+141
-63
lines changed

template/react-webpack/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,13 @@ index.js中监听模块变化,并执行替换逻辑
102102
}
103103
104104
```
105+
106+
#### 5. 支持说明
107+
108+
```
109+
支持ts和tsx语法
110+
支持jsx解析,支持服务器代理
111+
支持css模块化,模块化导入请后缀带有module.css
112+
支持less和less模块化,模块化导入请后缀带有module.less
113+
支持文件导入,并且小文件自动编译base64,大文件单独导出
114+
```

template/react-webpack/package-lock.json

Lines changed: 86 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

template/react-webpack/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
"less": "^3.10.3",
2929
"less-loader": "^5.0.0",
3030
"style-loader": "^1.0.1",
31+
"ts-loader": "^6.2.1",
32+
"typescript": "^3.7.5",
3133
"url-loader": "^3.0.0",
3234
"webpack": "^4.41.2",
3335
"webpack-cli": "^3.3.10",

template/react-webpack/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ function App(props) {
1616

1717
return (
1818
<>
19+
<App2>asdfas</App2>
1920
<p>导航栏会改变内容面板</p>
2021
<button onClick={(e) => {
2122
dispatch({type: "RESET"})

template/react-webpack/src/routes/routes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
22

3-
import Home from "../page/home/home";
4-
import About from "../page/about/about";
5-
import View404 from "../page/status/view404";
3+
import Home from "../page/home/home.jsx";
4+
import About from "../page/about/about.jsx";
5+
import View404 from "../page/status/view404.jsx";
66

77

88
const routes = [

template/react-webpack/src/setupProxy.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)