SAPUI5创建但不运行预加载文件(SAPUI5 creating, but not running preload files)

编程入门 行业动态 更新时间:2024-10-23 21:33:19
SAPUI5创建但不运行预加载文件(SAPUI5 creating, but not running preload files)

我已经设置了以下bootstap,data-sap-ui-preload设置为“auto”

<!-- Bootstrap the UI5 core library --> <script id="sap-ui-bootstrap" src="resources/sap-ui-core.js" data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-compatVersion="edge" data-sap-ui-preload="auto" data-sap-ui-xx-bindingSyntax="complex" data-sap-ui-resourceroots='xxxxxxxxxxx'> </script>

这会在我的所有3个独立应用程序中创建一个Component-preload.js文件。

不幸的是,当我运行它时,文件没有缩小,我可以直接访问控制器等。

还有其他人遇到过这个问题吗?

I have set up the following bootstap, with data-sap-ui-preload set to "auto"

<!-- Bootstrap the UI5 core library --> <script id="sap-ui-bootstrap" src="resources/sap-ui-core.js" data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-compatVersion="edge" data-sap-ui-preload="auto" data-sap-ui-xx-bindingSyntax="complex" data-sap-ui-resourceroots='xxxxxxxxxxx'> </script>

This creates a Component-preload.js file in all of my 3 separate apps.

Unfortunately, when I run it, the files aren't minified, and I can access the controller etc directly.

Has anyone else came across this issue?

最满意答案

如果我理解正确,你期望“data-sap-ui-preload”创建额外的文件并缩小代码。 那是对的吗?

如果我正确阅读文档 ,这不是该参数的用途。

如果你正在寻找如何“缩小”你的能力的方法,你应该看看GruntJS 。 SAP本身也使用了一个UI5 Grunt任务运行器 。

if I understand correctly you are expecting that "data-sap-ui-preload" creates additional files and also minifies the code. Is that correct?

If i read the documentation correctly this is not what this parameter is used for.

If you are looking of ways on how to "minify" your could you should look into GruntJS. There is also a UI5 Grunt task runner that is used by SAP itself.

更多推荐

本文发布于:2023-07-05 09:00:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1035485.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:但不   加载   文件   files   preload

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!