Questions tagged [requirejs-text]

45 questions
1
vote
1 answer

RequireJS Optimizer throws ReferenceError: text is not defined

I have been using r.js to attempt to minify a fairly large project and I'm having trouble with the text plugin. I am using node.js and a build file that goes as follows: Build File ({ name: '../main', baseUrl: '../../js/app', appDir:…
Khior
  • 1,244
  • 1
  • 10
  • 20
1
vote
1 answer

(8 out of range 6) Underscore.js Templates

I am using Backbone.js and underscore.js with Requirejs. However when i try to load my view template, it gives me (8 out of range 6) error in Underscore.js line 8. Please tell me what i am doing wrong. Here is my code: var imageView = new…
1
vote
1 answer

requirejs optimization error: Loader plugin did not call the load callback in the build: text

Using require.js with the requirejs api (r.js) for optimization/minification and needed to reorganize our directory structure (and, therefore, re-map everything in the requirejs config file/etc). Result of attempting a compile (through node) is…
0
votes
1 answer

Knockout Template is not working in IE 8 using RequireJS and Require Text

I have a problem rendering a tree object in JavaScript when using IE8. In order to write a hierarchy in an HTML page, I need to use a knockout template to recursively render the tree object. I am using knockout components to render the final result…
0
votes
2 answers

RequireJs text plugin and UnderscoreJs templates

Alright people, I am using the RequireJs text plugin to pull in underscore templates (.html) in my backbone application. Unfortunately my underscore code in my templates are being rendered as plain text. define(['Backbone',…
John williams
  • 654
  • 1
  • 8
  • 22
0
votes
0 answers

requirejs keeps reloading all my dependencies

I have a Backbone.js web project structured as the following: ├───container │ container.html │ ContainerView.js │ ├───home │ home.html │ HomeView.js │ └───search houses-list-template.html …
JayZee
  • 851
  • 1
  • 10
  • 17
0
votes
1 answer

RequireJS text plugin - minification of templates

I'm using text plugin to import my templates. Now, in production I don't want that there are many XHR requests for templates so I would like to get them in one go. My idea was to have build task which would take template and create something…
Slaven Tomac
  • 1,552
  • 2
  • 26
  • 38
0
votes
0 answers

Cannot add requirejs-text plugin in brunch-with-marionette application

I used brunch-with-marionette skeleton available at: https://github.com/SimbCo/brunch-with-marionette Everything works fine for me but I don't know the necessary configuration in this skeleton to add requirejs-text plugin. I tried: npm install…
user1344502
  • 75
  • 1
  • 1
  • 8
0
votes
1 answer

Aurelia mechanism for dynamically loading HTML View templates

I realize from the Aurelia 0.10.0 Release & Status blog post that Aurelia's "bundling solution is about 50% complete". For the purpose of releasing a standalone embeddable Aurelia app (on 3rd party site), am interested to know if there is currently…
Ashley Brener
  • 268
  • 3
  • 12
0
votes
1 answer

Getting chai to play nice with requirejs

I am attempting to set up Karma/Mocha/Chai into my Backbone project, which uses requirejs and not having much luck. First, here's my setup: - app/ - js/ - bower_components/ - node_modules/ - test/ - test-main.js - karma.conf.js // relevant…
jbarreiros
  • 1,103
  • 1
  • 10
  • 21
0
votes
1 answer

With RequireJS optimization, are templates added to the build file or stay "on demand"?

Using RequireJS, after optimization using r.js are files loaded via the text plugin (like templates) downloaded on demand or included in the single optimized build file?
JL Gradley
  • 1,731
  • 4
  • 14
  • 15
0
votes
1 answer

Prevent optimization of text! and json! plugins on requirejs optimization tool

I'm using the following architecture for my multipage requirejs based application.: https://github.com/requirejs/example-multipage-shim The repository explains how to optimize the application by running r.js, the command line tool used for this kind…
Lothre1
  • 3,523
  • 7
  • 43
  • 64
0
votes
2 answers

Can't use requirejs

I'm newby in require.js. I have next trouble. I linked require.js : code main.js require.config( { shim: { backbone: { exports: 'backbone' …
Ilya.R
  • 41
  • 7
0
votes
1 answer

able to run my backbone js project on localhost,not able to run locally in chrome browser

I am able to run my backbone js project on localhost, but when i run index.html page directly it is giving access-control-allow-origin error only in chrome browser, in firefox it is working fine in both the cases.
-1
votes
1 answer

RequireJS Text Plugin Imports My Templates Incorrectly

When importing a text file using require.js with the text plugin, some of the forward slashes are missing in the final output, causing the parser to fail because of unclosed block statements. The JavaScript is pretty standard and looks something…
1 2
3