-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.lowcode.js
116 lines (115 loc) · 3.63 KB
/
build.lowcode.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
const { name, version } = require('./package.json');
const { library } = require('./build.json');
module.exports = {
alias: {
'@': './src',
},
plugins: [
[
'@alifd/build-plugin-lowcode',
{
library,
engineScope: '@alilc',
noParse: true,
npmInfo: {
package: name,
version,
},
singleComponent: true,
lowcodeDir: 'lowcode',
entryPath: 'src/index.tsx',
categories: ['基础', '数据', '容器', '导航'],
builtinAssets: [
{
packages: [
{
package: 'moment',
version: '2.24.0',
urls: ['https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js'],
library: 'moment',
},
{
package: 'lodash',
library: '_',
urls: ['https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js'],
},
{
package: 'icon',
library: '_',
urls: ['//at.alicdn.com/t/c/font_3985289_s4clqvzrmkm.js'],
},
{
package: '@ant-design/icons',
version: '4.7.0',
urls: [`//g.alicdn.com/code/npm/@ali/ant-design-icons-cdn/4.5.0/index.umd.min.js`],
library: 'icons',
},
{
package: 'bootstrap',
version: '5.3.0',
urls: [
'https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css',
'https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js',
],
library: 'bootstrap',
},
{
package: 'antd',
version: '4.23.0',
urls: [
'//g.alicdn.com/code/lib/antd/4.23.0/antd.min.js',
'//g.alicdn.com/code/lib/antd/4.23.0/antd.min.css',
],
library: 'antd',
},
{
package: 'form-materials',
version: '0.1.0',
library: 'FormMaterials',
urls: [
'/materials/form/render/default/view.js',
'/materials/form/render/default/view.css',
],
editUrls: ['/materials/form/view.js', '/materials/form/view.css'],
advancedUrls: {
default: [
'/materials/form/render/default/view.js',
'/materials/form/render/default/view.css',
],
},
advancedEditUrls: {},
},
],
components: [
{
exportName: 'FormMaterialsMeta',
npm: {
package: 'form-materials',
version: '0.1.0',
},
url: '/materials/form/meta.js',
urls: {
default: '/materials/form/meta.js',
},
advancedUrls: {
default: ['/materials/form/meta.js'],
},
},
],
},
],
},
],
[
'@alilc/build-plugin-alt',
{
type: 'component',
inject: true,
library,
// 配置要打开的页面,在注入调试模式下,不配置此项的话不会打开浏览器
// 支持直接使用官方 demo 项目:https://lowcode-engine.cn/demo/index.html
openUrl: 'http://localhost:5556?debug',
},
],
],
};