How can I load my own js module with goog.provide and goog.require?

后端 未结 7 1091
小蘑菇
小蘑菇 2020-12-30 04:05

We are trying to switch the packaging for our project from dojo to google closure, but we haven\'t had any luck so far. Here is a simple example that illustrates what we are

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-30 04:23

    Either way to get custom modules working, at least for development version, is to include manually js files in head section of html page, after google's base.js file inclusion.

    
    
    
    ...
    

    But, you should care about sequence of inclusion by yourself. For not very large custom files sets it works good. For production version you still had better use js source compiling to get all benefits of closure library.

提交回复
热议问题