@cloudbase/lowcode-builder 1.10.17 → 1.10.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/lowcode-builder",
3
- "version": "1.10.17",
3
+ "version": "1.10.19",
4
4
  "description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
5
5
  "author": "yhsunshining@gmail.com",
6
6
  "homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
@@ -50,7 +50,7 @@
50
50
  "@babel/core": "7.21.4",
51
51
  "@babel/preset-env": "7.21.4",
52
52
  "@cloudbase/cals": "^1.2.15",
53
- "@cloudbase/lowcode-generator": "^1.8.40",
53
+ "@cloudbase/lowcode-generator": "^1.8.41",
54
54
  "axios": "^0.21.0",
55
55
  "chalk": "^2.4.2",
56
56
  "compare-versions": "^3.6.0",
@@ -557,7 +557,7 @@
557
557
  crossorigin
558
558
  src="<%=
559
559
  cdnEndpoints.cdngo
560
- %>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.fd1b27602e39c28d39b3.bundle.js"
560
+ %>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.93928e464f3c8e8b7fa5.bundle.js"
561
561
  ></script>
562
562
  </body>
563
563
  </html>
@@ -99,6 +99,14 @@ module.exports = function (options) {
99
99
  hashDigestLength: 20,
100
100
  }),
101
101
  new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
102
+ new webpack.NormalModuleReplacementPlugin(
103
+ /@\/components\/(?!ui)(.*)/, // 使用否定前瞻匹配除ui外的所有路径
104
+ function (resource) {
105
+ if (/\@\/components\/(.*)/.test(resource.request) && /lowcode\/(pages|components)/.test(resource.context)) {
106
+ resource.request = resource.request.replace(/\@\/components\/(.*)/, '@/lowcode/components/$1');
107
+ }
108
+ },
109
+ ),
102
110
  // new BundleAnalyzerPlugin(),
103
111
  ];
104
112
  if (vueVersion === 2) {
@@ -206,17 +214,36 @@ module.exports = function (options) {
206
214
  publicPath: output.publicPath,
207
215
  pathinfo: false,
208
216
  },
209
- externals: {
210
- react: 'window.React',
211
- 'react-dom': 'window.ReactDOM',
212
- mobx: 'window.mobx',
213
- '@cloudbase/js-sdk': 'window.cloudbase',
214
- '@cloudbase/weda-cloud-sdk/dist/h5': 'window.CloudSDK',
215
- '@cloudbase/weda-cloud-sdk': 'window.CloudSDK',
216
- '@cloudbase/weda-client': 'window.WedaClientSDK',
217
- '@zxing/library': 'window.ZXing',
218
- '@cloudbase/lowcode-render': 'window["weda-render"]',
219
- },
217
+ externals: [
218
+ {
219
+ react: 'window.React',
220
+ 'react-dom': 'window.ReactDOM',
221
+ mobx: 'window.mobx',
222
+ '@cloudbase/js-sdk': 'window.cloudbase',
223
+ '@cloudbase/weda-cloud-sdk/dist/h5': 'window.CloudSDK',
224
+ '@cloudbase/weda-cloud-sdk': 'window.CloudSDK',
225
+ '@cloudbase/weda-client': 'window.WedaClientSDK',
226
+ '@zxing/library': 'window.ZXing',
227
+ '@cloudbase/lowcode-render': 'window["weda-render"]',
228
+ },
229
+ // 函数
230
+ function (context, request, callback) {
231
+ if (/lowcode\/(pages|components)/.test(context)) {
232
+ ['@/components/ui', 'lucide-react'].includes(request);
233
+ switch (request) {
234
+ case '@/components/ui': {
235
+ callback(null, 'window.SHADN.components');
236
+ return;
237
+ }
238
+ case 'lucide-react': {
239
+ callback(null, 'window.SHADN.LUCIDE');
240
+ return;
241
+ }
242
+ }
243
+ }
244
+ callback();
245
+ },
246
+ ],
220
247
  cache: {
221
248
  type: 'memory',
222
249
  },