Skip to content

Commit 982d0d6

Browse files
committed
feat: support UMD packageing for react-renderer
1 parent 36caf0f commit 982d0d6

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"entry": {
3+
"react-renderer": "src/index"
4+
},
5+
"sourceMap": true,
6+
"library": "AliLowCodeReactRenderer",
7+
"libraryTarget": "umd",
8+
"externals": {
9+
"react": "var window.React",
10+
"react-dom": "var window.ReactDOM",
11+
"prop-types": "var window.PropTypes",
12+
"@alifd/next": "var Next",
13+
"moment": "var window.moment"
14+
},
15+
"polyfill": false,
16+
"outputDir": "dist",
17+
"vendor": false,
18+
"ignoreHtmlTemplate": true,
19+
"plugins": [
20+
"build-plugin-react-app",
21+
["build-plugin-fusion", {
22+
"externalNext": "umd"
23+
}],
24+
["build-plugin-moment-locales", {
25+
"locales": ["zh-cn"]
26+
}]
27+
]
28+
}

packages/react-renderer/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"scripts": {
1212
"test": "build-scripts test --config build.test.json",
1313
"start": "build-scripts start",
14-
"build": "build-scripts build --skip-demo"
14+
"build": "build-scripts build --skip-demo",
15+
"cloud-build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.cloud.json"
1516
},
1617
"keywords": [
1718
"lowcode",
@@ -28,6 +29,7 @@
2829
"build-plugin-component": "^0.2.10",
2930
"build-plugin-fusion": "^0.1.0",
3031
"build-plugin-moment-locales": "^0.1.0",
32+
"build-plugin-react-app": "^2.2.0",
3133
"react": "^16.4.1",
3234
"react-dom": "^16.4.1",
3335
"react-test-renderer": "^16"

0 commit comments

Comments
 (0)