1

假设我的 gwt 项目中有 2 个模块,它的结构是这样的

src
- main
 - java
     module1.gwt.xml
     module2.gwt.xml
     - client
          - module1
               - stuff
          - module2
               - stuff

并在每个模块 xml 文件上

<module rename-to='module1'>
       ... their own entry point and stuff..
</module>

<module rename-to='module2'>
       ... their own entry point and stuff..
</module>

因此,由此,在编译时,我会得到 2 个 nocache.js 文件,即“ module1.nocache.js ”和“ module2.nocache.js ”。通过将其中的 2 个包含到 HTML 页面中,这完全可以正常工作。

我的问题是,有什么办法可以编译多个模块并获得一个包含两个模块的 nocache.js 文件?

谢谢 !:-D

4

1 回答 1

1

更改项目结构应该可以解决您的问题。

尝试这样的事情:

src
- main
 - java
  - module1 
     module1.gwt.xml
     - client
       - stuff
  - module2  
     module2.gwt.xml
     - client
       - stuff

您必须定义一个模块来启动您的应用程序。第二个模块应该由第一个模块继承。

于 2014-03-21T15:17:37.007 回答