Skip to content

Commit 2905b16

Browse files
committed
test(react-ui): 添加对 iife 打包的测试
1 parent b7467bc commit 2905b16

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Title</title>
6+
<script src="../../node_modules/react/umd/react.production.min.js"></script>
7+
<script src="../../node_modules/react-dom/umd/react-dom.production.min.js"></script>
8+
<script src="./dist/index.iife.js"></script>
9+
<link rel="stylesheet" href="./dist/index.css" />
10+
</head>
11+
<body>
12+
<div id="root"></div>
13+
<script>
14+
ReactDOM.createRoot(document.getElementById('root')).render(
15+
React.createElement(
16+
ToolPackReactUI.Button,
17+
{
18+
onClick: () => {
19+
ToolPackReactUI.showLoading();
20+
},
21+
type: 'primary',
22+
},
23+
'toggle',
24+
),
25+
);
26+
</script>
27+
</body>
28+
</html>

0 commit comments

Comments
 (0)