gpt4 book ai didi

grails lesscss-resources 插件问题

转载 作者:行者123 更新时间:2023-12-02 14:17:38 25 4
gpt4 key购买 nike

我在使用插件时遇到问题。一切似乎都很好,但在开发环境中运行应用程序后,页面加载但提示找不到编译的 css 文件。我正在使用 Grails 2.0.1 和 lesscss-resources 1.3.0。

这是我在 UiResources.groovy 中的内容:

styling {
defaultBundle 'styling'

resources url: '/less/mainStyles.less', attrs:[rel: "stylesheet/less", type: 'css'], disposition: 'head', bundle: 'bundle_styling'
resources url: '/css/other.css', disposition: 'head'
}

页面上显示的是这样的:
< link href="/appName/bundle-bundle_styling_head.css" type="text/css" media="screen, projection" rel="stylesheet" >

虽然我可以在
~/.grails/2.0.1/projects/appName/tomcat/worl/Tomcat/localhost/appName/grails-resources ...

Grails 控制台也提示:
Resources not found: /bundle-bundle_styling_head.css

我一直在尝试不同的事情来让它发挥作用,直到无济于事。我在这里做错了吗?

最佳答案

我有一个类似的问题,发现删除捆绑选项解决了这个问题。所以删除 ", bundle: 'bundle_styling'"制作这条线:

资源 url: '/less/mainStyles.less', attrs:[rel: "stylesheet/less", type: 'css'], disposition: 'head'

希望这对你也有效。

关于grails lesscss-resources 插件问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10455204/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com