Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

steal buildjs produces error with ejs templates

$
0
0
My App works fine in development mode but I get an error when I build the production file.

Here is my simple test code:

  1. steal( 'can/control/control.js', 'can/view/view.js', 'can/view/ejs/ejs.js', 'can/view/modifiers/modifiers.js'
  2.     ).then(
  3.     'amo/tester/tester.ejs',
  4.     function() {
  5. var AmoTester = can.Control("Amo.Tester", {
  6.         defaults: {
  7.             latestData: false,
  8.             theThings: {
  9.                 'germany': {
  10.                     'ref': "deutschland",
  11.                     'lang': "deutsch",
  12.                     'header': "Hello here!"
  13.                 },
  14.                 'us': {
  15.                     'ref': "usa",
  16.                     'lang': "english",
  17.                     'header': "Hello there!"
  18.                 }
  19.             },
  20.             appStatus: false
  21.         }
  22.     },
  23.     {
  24.         init: function( element , options ) {
  25.            
  26.             this.oneEl = $('#oneDiv');
  27.             this.renderTest();
  28.         },
  29.         renderTest: function() {
  30.             this.oneEl.html('amo/tester/tester.ejs', {
  31.                 theThings: this.options.theThings
  32.             });
  33.         }
  34.     });
  35.     var amoTester2 = new Amo.Tester( $('#oneDiv') );
  36. });
My template is very simple:

  1. <%= this.theThings.germany.ref %>
This is the error:
  1. Opening amo/tester/tester.html
  2. !!!!!!!!!!! ERROR !!!!!!!!!!!
  3. -message    = Cannot find function createDocumentFragment in object [object Object].
  4. -fileName   = file:///F:/......./amo-project/can/lib/jquery.1.8.3.js
  5. -lineNumber = 6162
  6. -name       = TypeError

I think I am using the latest of everything.


Viewing all articles
Browse latest Browse all 3491

Trending Articles