Asset pipeline Grails资产管道:引用一个依赖项';s资产
我正在构建一个grails应用程序,它使用依赖项中的资产,就像它们在我自己的项目中一样。在开发模式下运行应用程序效果良好,因为没有任何文件被丑化/缩小。但是,当为生产构建预处理文件时,会出现错误,因为处理器找不到它们 您可以在assetCompile任务的输出中看到它:Asset pipeline Grails资产管道:引用一个依赖项';s资产,asset-pipeline,grails-3.0,Asset Pipeline,Grails 3.0,我正在构建一个grails应用程序,它使用依赖项中的资产,就像它们在我自己的项目中一样。在开发模式下运行应用程序效果良好,因为没有任何文件被丑化/缩小。但是,当为生产构建预处理文件时,会出现错误,因为处理器找不到它们 您可以在assetCompile任务的输出中看到它: :assetCompile ... Unable to Locate Asset: /spring-websocket.js Unable to Locate Asset: /spring-websocket Uglifying
:assetCompile
...
Unable to Locate Asset: /spring-websocket.js
Unable to Locate Asset: /spring-websocket
Uglifying File 18 of 28 - application
Compressing File 18 of 28 - application
Processing File 19 of 28 - jquery-2.1.3.js
Uglifying File 19 of 28 - jquery-2.1.3
Compressing File 19 of 28 - jquery-2.1.3
Processing File 20 of 28 - my-websocket.js
Unable to Locate Asset: /spring-websocket
Uglifying File 20 of 28 - my-websocket
Compressing File 20 of 28 - my-websocket
...
Processing File 26 of 28 - sockjs.js
Uglifying File 26 of 28 - sockjs
Compressing File 26 of 28 - sockjs
Processing File 27 of 28 - spring-websocket.js
Unable to Locate Asset: /sockjs
Unable to Locate Asset: /stomp
Uglifying File 27 of 28 - spring-websocket
Compressing File 27 of 28 - spring-websocket
Processing File 28 of 28 - stomp.js
Uglifying File 28 of 28 - stomp
Compressing File 28 of 28 - stomp
Finished Precompiling Assets
所需的资产与SpringWebSocket(sock.js和stomp.js)捆绑在一起。您可以看到预编译器抱怨它们,但最终还是找到了它们。这些单独的文件会进入final.war,但不会进入包含依赖代码的缩小的application.js。资产管道有办法处理这个问题吗?对我来说似乎是一个bug,它仍然存在于Grails 4中-在这里报告了它:对我来说似乎是一个bug,它仍然存在于Grails 4中-在这里报告了它: