@pisell/build-plugin-lowcode 1.0.7 → 1.0.9
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 +1 -1
- package/src/constants.js +1 -1
- package/src/index.js +24 -12
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -12,7 +12,7 @@ const COMMON_EXTERNALS = {
|
|
|
12
12
|
'@alilc/lowcode-engine': 'var window.AliLowCodeEngine',
|
|
13
13
|
'@ali/lowcode-rax-renderer': 'var window.alilcLowcodeRaxRenderer',
|
|
14
14
|
rax: 'var window.Rax',
|
|
15
|
-
antd: 'var window.antd',
|
|
15
|
+
// antd: 'var window.antd',
|
|
16
16
|
'@alifd/lowcode-preset-plugin': 'var window.PluginLowcodeEditor',
|
|
17
17
|
'monaco-editor/esm/vs/editor/editor.api': 'var window.monaco',
|
|
18
18
|
'monaco-editor/esm/vs/editor/editor.main.js': 'var window.monaco',
|
package/src/index.js
CHANGED
|
@@ -717,9 +717,12 @@ async function bundleMetaV2(options, pluginOptions, execCompile, metaType) {
|
|
|
717
717
|
config.output.path(path.resolve(rootDir, `${buildTarget}/${lowcodeDir}`));
|
|
718
718
|
config.externals({ ...COMMON_EXTERNALS_MAP[engineScope], ...externals });
|
|
719
719
|
useStyleLoader(config);
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
720
|
+
// 物料中 svg 图标处理
|
|
721
|
+
config.module
|
|
722
|
+
.rules.delete('svg');
|
|
723
|
+
|
|
724
|
+
config.module.rule('svg').test(/\.svg$/).use('svgr').loader('@svgr/webpack').end().use('url-loader').loader('url-loader').end();
|
|
725
|
+
|
|
723
726
|
});
|
|
724
727
|
return metaPath;
|
|
725
728
|
}
|
|
@@ -925,9 +928,12 @@ async function bundleEditorView(
|
|
|
925
928
|
config.output.library(library).libraryTarget('umd');
|
|
926
929
|
config.output.path(path.resolve(rootDir, `${buildTarget}/${lowcodeDir}`));
|
|
927
930
|
config.externals({ ...COMMON_EXTERNALS_MAP[engineScope], ...externals });
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
+
// 物料中 svg 图标处理
|
|
932
|
+
config.module
|
|
933
|
+
.rules.delete('svg');
|
|
934
|
+
|
|
935
|
+
config.module.rule('svg').test(/\.svg$/).use('svgr').loader('@svgr/webpack').end().use('url-loader').loader('url-loader').end();
|
|
936
|
+
|
|
931
937
|
if (baseLibrary === 'rax') {
|
|
932
938
|
const scssRule = config.module.rule('scss');
|
|
933
939
|
scssRule.use('rpx-loader').loader('rpx-loader').before('css-loader');
|
|
@@ -1010,9 +1016,12 @@ async function bundleRenderView(options, pluginOptions, platform, execCompile) {
|
|
|
1010
1016
|
config.output.library(library).libraryTarget('umd');
|
|
1011
1017
|
config.output.path(path.resolve(rootDir, `${buildTarget}/${lowcodeDir}/render/${platform}`));
|
|
1012
1018
|
config.externals({ ...COMMON_EXTERNALS_MAP[engineScope], ...externals });
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1019
|
+
// 物料中 svg 图标处理
|
|
1020
|
+
config.module
|
|
1021
|
+
.rules.delete('svg');
|
|
1022
|
+
|
|
1023
|
+
config.module.rule('svg').test(/\.svg$/).use('svgr').loader('@svgr/webpack').end().use('url-loader').loader('url-loader').end();
|
|
1024
|
+
|
|
1016
1025
|
if (baseLibrary === 'rax') {
|
|
1017
1026
|
const scssRule = config.module.rule('scss');
|
|
1018
1027
|
scssRule.use('rpx-loader').loader('rpx-loader').before('css-loader');
|
|
@@ -1290,9 +1299,12 @@ async function bundleComponentMeta(webPackConfig, options, pluginOptions, execCo
|
|
|
1290
1299
|
config.output.path(path.resolve(rootDir, `${buildTarget}/${lowcodeDir}`));
|
|
1291
1300
|
config.externals({ ...COMMON_EXTERNALS_MAP[engineScope], ...externals });
|
|
1292
1301
|
useStyleLoader(config);
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1302
|
+
// 物料中 svg 图标处理
|
|
1303
|
+
config.module
|
|
1304
|
+
.rules.delete('svg');
|
|
1305
|
+
|
|
1306
|
+
config.module.rule('svg').test(/\.svg$/).use('svgr').loader('@svgr/webpack').end().use('url-loader').loader('url-loader').end();
|
|
1307
|
+
|
|
1296
1308
|
});
|
|
1297
1309
|
})(component, idx);
|
|
1298
1310
|
});
|