2014-07-21 2 views
2

require.js를 사용하는 프로젝트를 컴파일하려고합니다. 나는 r.js와 optmize 싶습니다하지만 난 빌드 문제에 직면 :r.js 및 텍스트 플러그인

Error: RangeError: Maximum call stack size exceeded 
In module tree: 
    main 
     vorbok 
     dataloader 

내가이 줄을 경우, 문제가 사라진 것을 dataload 모듈 예고 있습니다

"text!/templates/registration/mous 

Taché에 /toppanel.moustache "

내 구성 파일은 다음과 같습니다

({ 
    appDir: "../../lambdev/src/interface/static/js/registration", 
    baseUrl: ".", 
    dir: "../app-build", 
    paths: { 
     jquery: '../jquery/jquery-2.0.0.min', 
     Grid:"grid", 
     Backbone:"../bower_components/backbone/backbone-min", 
     Gridutils:"gridutils", 
     Underscore:"../bower_components/underscore/underscore-min", 
     text:"../bower_components/requirejs-text/text", 
     mustache:"../mustache", 
     jcolor: "jquery/jquery.color", 
     bootstrap:"../bootstrap3/bootstrap.min", 
     gridtable:"gridtable", 
     gridvalidation:"gridvalidation", 
     table_engine:"table_engine", 
     paginator:'../bootstrap3/bootstrap-paginator.min', 
     fangskraningpanel:"mmode/massaskraning", 
     routerfunctions:"routerfunctions", 
     moment:"../bower_components/moment/min/moment.min", 
     rowvalidation:"rowvalidation", 
     utils:"../various/utils", 
     batch:"batch", 
     messages:"messages", 
     autocomplete:"../bower_components/jquery-ui/ui/minified/jquery-ui.min", 
     jstorage:"../bower_components/jstorage/jstorage.min", 
     notify:"notify", 
     whenitype:"../bower_components/jquery.whenitype/dist/jquery.whenitype.min", 
     dataloader:"dataloader", 
     inputhelper:"../various/input.helper", 
     listeners:"listeners", 
     nod:"../bower_components/jquery-nod/nod", 
     tooltip:"bootstrap3/tooltip", 
     qtip:"../jquery/jquery.qtip", 
     modal:"../bootstrap3/modal", 
     ramsearch:"../various/ramsearch", 
     ewesearch:"../various/ewesearch", 
     focusmanager:"focusmanager", 
     vorbok:"mmode/vorbok", 
     afdrifaskraning:"mmode/afdrifaskraning", 
     saedingaskraning:"mmode/saedingaskraning", 
     saedingar:"mmode/saedingar", 
     error_check_panel:"mmode/error_check_panel", 
     keytooltips:"keytooltips", 


    }, 
    optimizeCss: "standard.keepLines", 
    modules: [ 
     { 
      name: "main" 
     } 
    ], 
    stubModules : ['text'], 
    inlineText: true, 
    optimizeAllPluginResources: false, 
    fileExclusionRegExp: /\.hg/ 
}) 
내가 필요

알고 어떻게 내가 할 수있는 텍스트 플러그인으로 인한 오류를 수정하십시오.

답변

0

이 질문은 다소 오래된 질문이지만,이 문제를 직접 해결하여 해결할 수 있다고 생각했습니다.

내 텍스트 파일의 정의 경로는 RequireJS의 취향이 아니 었습니다. 나는 아래, 내 JS 파일에서 분리 된 내 파일 시스템 내 HTML 템플릿을했다 : 한 번

'text!../../html/ko-component-template.html' 
RequireJS를 컴파일하지 않고 일을

:하지만,

. 
├── html 
| ├── ko-component-template.html 
├── js 
| ├── app 
|  ├── ko-component.js 

그래서 나는 HTML 템플릿과 같이 정의했다 Grunt가 오류를 컴파일했을 때 오류가 발생했습니다.

'text!html/ko-component-template.html' 
: 나는 부모 디렉토리

. 
├── js 
| ├── app 
|  ├── ko-component.js 
| ├── html 
|  ├── ko-component-template.html 

를들로 통과 할 수 없을 것 그리고 지금은이 같은 HTML 템플릿을 정의 할 수 있도록

그래서 나는 그것을 개편

관련 문제