@pisell/build-plugin-lowcode 1.0.2 → 1.0.4
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 +2 -1
- package/src/index.js +5 -0
- package/src/public/designer.html +1 -2
- package/src/public/index.html +1 -2
- package/src/public/preview.html +1 -2
- package/src/templates/index.jsx +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/build-plugin-lowcode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "build plugin for component-to-lowcode",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@alilc/lowcode-react-renderer": "^1.0.1",
|
|
29
29
|
"@alilc/lowcode-types": "^1.0.1",
|
|
30
30
|
"@alilc/lowcode-utils": "^1.0.1",
|
|
31
|
+
"@svgr/webpack": "^8.0.1",
|
|
31
32
|
"axios": "^0.21.4",
|
|
32
33
|
"build-scripts-config": "^3.0.3",
|
|
33
34
|
"chokidar": "^3.5.3",
|
package/src/index.js
CHANGED
|
@@ -507,6 +507,7 @@ async function start(options, pluginOptions) {
|
|
|
507
507
|
}
|
|
508
508
|
config.externals({ ...COMMON_EXTERNALS_MAP[engineScope], ...externals });
|
|
509
509
|
!disableStyleLoader && useStyleLoader(config);
|
|
510
|
+
config.module.rule('svg').test(/\.svg$/).use('svgr').loader('@svgr/webpack').before('css-loader');
|
|
510
511
|
if (baseLibrary === 'rax') {
|
|
511
512
|
config.module.rule('scss').use('rpx-loader').loader('rpx-loader').before('css-loader');
|
|
512
513
|
}
|
|
@@ -710,6 +711,7 @@ async function bundleMetaV2(options, pluginOptions, execCompile, metaType) {
|
|
|
710
711
|
config.output.path(path.resolve(rootDir, `${buildTarget}/${lowcodeDir}`));
|
|
711
712
|
config.externals({ ...COMMON_EXTERNALS_MAP[engineScope], ...externals });
|
|
712
713
|
useStyleLoader(config);
|
|
714
|
+
config.module.rule('svg').test(/\.svg$/).use('svgr').loader('@svgr/webpack').before('css-loader');
|
|
713
715
|
});
|
|
714
716
|
return metaPath;
|
|
715
717
|
}
|
|
@@ -915,6 +917,7 @@ async function bundleEditorView(
|
|
|
915
917
|
config.output.library(library).libraryTarget('umd');
|
|
916
918
|
config.output.path(path.resolve(rootDir, `${buildTarget}/${lowcodeDir}`));
|
|
917
919
|
config.externals({ ...COMMON_EXTERNALS_MAP[engineScope], ...externals });
|
|
920
|
+
config.module.rule('svg').test(/\.svg$/).use('svgr').loader('@svgr/webpack').before('css-loader');
|
|
918
921
|
if (baseLibrary === 'rax') {
|
|
919
922
|
const scssRule = config.module.rule('scss');
|
|
920
923
|
scssRule.use('rpx-loader').loader('rpx-loader').before('css-loader');
|
|
@@ -997,6 +1000,7 @@ async function bundleRenderView(options, pluginOptions, platform, execCompile) {
|
|
|
997
1000
|
config.output.library(library).libraryTarget('umd');
|
|
998
1001
|
config.output.path(path.resolve(rootDir, `${buildTarget}/${lowcodeDir}/render/${platform}`));
|
|
999
1002
|
config.externals({ ...COMMON_EXTERNALS_MAP[engineScope], ...externals });
|
|
1003
|
+
config.module.rule('svg').test(/\.svg$/).use('svgr').loader('@svgr/webpack').before('css-loader');
|
|
1000
1004
|
if (baseLibrary === 'rax') {
|
|
1001
1005
|
const scssRule = config.module.rule('scss');
|
|
1002
1006
|
scssRule.use('rpx-loader').loader('rpx-loader').before('css-loader');
|
|
@@ -1274,6 +1278,7 @@ async function bundleComponentMeta(webPackConfig, options, pluginOptions, execCo
|
|
|
1274
1278
|
config.output.path(path.resolve(rootDir, `${buildTarget}/${lowcodeDir}`));
|
|
1275
1279
|
config.externals({ ...COMMON_EXTERNALS_MAP[engineScope], ...externals });
|
|
1276
1280
|
useStyleLoader(config);
|
|
1281
|
+
config.module.rule('svg').test(/\.svg$/).use('svgr').loader('@svgr/webpack').before('css-loader');
|
|
1277
1282
|
});
|
|
1278
1283
|
})(component, idx);
|
|
1279
1284
|
});
|
package/src/public/designer.html
CHANGED
|
@@ -56,8 +56,7 @@
|
|
|
56
56
|
React.PropTypes = PropTypes;
|
|
57
57
|
</script>
|
|
58
58
|
<script src="https://g.alicdn.com/platform/c/??react15-polyfill/0.0.1/dist/index.js,lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js,natty-storage/2.0.2/dist/natty-storage.min.js,natty-fetch/2.6.0/dist/natty-fetch.pc.min.js,tinymce/4.2.5/tinymce-full.js"></script>
|
|
59
|
-
|
|
60
|
-
<!--<script src="https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"></script>-->
|
|
59
|
+
<script src="https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"></script>
|
|
61
60
|
<script src="https://g.alicdn.com/code/lib/dayjs/1.11.7/dayjs.min.js"></script>
|
|
62
61
|
<script src="https://g.alicdn.com/code/lib/alifd__next/1.23.20/next-with-locales.min.js"></script>
|
|
63
62
|
<script crossorigin="anonymous" src="<%= engineCoreJsUrl %>"></script>
|
package/src/public/index.html
CHANGED
|
@@ -59,8 +59,7 @@
|
|
|
59
59
|
React.PropTypes = PropTypes;
|
|
60
60
|
</script>
|
|
61
61
|
<script src="https://g.alicdn.com/platform/c/??react15-polyfill/0.0.1/dist/index.js,lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js,natty-storage/2.0.2/dist/natty-storage.min.js,natty-fetch/2.6.0/dist/natty-fetch.pc.min.js,tinymce/4.2.5/tinymce-full.js"></script>
|
|
62
|
-
|
|
63
|
-
<!--<script src="https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"></script>-->
|
|
62
|
+
<script src="https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"></script>
|
|
64
63
|
<script src="https://g.alicdn.com/code/lib/dayjs/1.11.7/dayjs.min.js"></script>
|
|
65
64
|
<script src="https://g.alicdn.com/code/lib/alifd__next/1.23.20/next-with-locales.min.js"></script>
|
|
66
65
|
<% if (typeof antdJsUrl === 'string') { %>
|
package/src/public/preview.html
CHANGED
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
React.PropTypes = PropTypes;
|
|
32
32
|
</script>
|
|
33
33
|
<script src="https://g.alicdn.com/platform/c/??react15-polyfill/0.0.1/dist/index.js,lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js,natty-storage/2.0.2/dist/natty-storage.min.js,natty-fetch/2.6.0/dist/natty-fetch.pc.min.js,tinymce/4.2.5/tinymce-full.js"></script>
|
|
34
|
-
|
|
35
|
-
<!--<script src="https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"></script>-->
|
|
34
|
+
<script src="https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"></script>
|
|
36
35
|
<script src="https://g.alicdn.com/code/lib/dayjs/1.11.7/dayjs.min.js"></script>
|
|
37
36
|
|
|
38
37
|
<script src="https://g.alicdn.com/code/lib/alifd__next/1.23.20/next-with-locales.min.js"></script>
|
package/src/templates/index.jsx
CHANGED
|
@@ -16,6 +16,12 @@ const isNewEngineVersion = !!material;
|
|
|
16
16
|
const devMode = !!{{{ devMode }}};
|
|
17
17
|
const baseLibrary = '{{{baseLibrary}}}';
|
|
18
18
|
const basePackages = [
|
|
19
|
+
{
|
|
20
|
+
package: 'moment',
|
|
21
|
+
version: '2.24.0',
|
|
22
|
+
urls: ['https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js'],
|
|
23
|
+
library: 'moment',
|
|
24
|
+
},
|
|
19
25
|
{
|
|
20
26
|
package: 'dayjs',
|
|
21
27
|
version: '1.11.7',
|