我已经设置了以下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.
更多推荐
发布评论