Questions tagged [requirejs-text]
The requirejs-text tag has no usage guidance.
requirejs-text
46
questions
0
votes
0
answers
10
views
What is the ES6 module equivalent of requirejs-text for dependencies on text resources?
I use requirejs-text to load a text resource as a dependency of my module.
This makes it so I know the text resource (i.e. the text contents from a url)
is loaded and available by the time my module ...
1
vote
1
answer
2k
views
Migrating RequireJS/AMD with Plugins to Webpack
I'm working on migrating a large RequireJS application to Webpack. The basic build with Webpack seems to work fine -- I've moved "paths" definitions to "alias" and I've setup loaders for my content ...
3
votes
0
answers
1k
views
Unhandled rejection Error: Load timeout for modules: template-registry-entry
We've created a plugin, and its local demo works.
https://github.com/shaunluttin/aurelia-open-id-connect/tree/master/src
Installing the plugin into another project, though, fails with this sequence ...
2
votes
3
answers
2k
views
RequireJS text plugin: cannot load HTML from other domain
I'd like to fetch some html from another domain with require.js. I know that CORS policies doesn't allow this easily. Note: I have configured the web server (with Access-Control-Allow-Origin "*" and ...
0
votes
1
answer
325
views
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 ...
0
votes
2
answers
728
views
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 ...
0
votes
0
answers
95
views
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
...
0
votes
1
answer
93
views
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 ...
-1
votes
1
answer
36
views
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 ...
0
votes
0
answers
86
views
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 ...
1
vote
0
answers
139
views
requirejs require("text!../path/to/text/file") equivalent for browserify
I have requirejs 3rd party modules that use requirejs and require text files using require("text!somefile.txt")
How can I convert this to something browserify can read without any code change as its ...
0
votes
1
answer
1k
views
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 ...
1
vote
1
answer
574
views
Partial html localisation
The problem
I need to localise my web application. I use two languages - english and norwegian (that should not matter).
I use resource files to localise standard views. They sit in a separate ...
2
votes
1
answer
247
views
Symfony and RequireJS - How to serve static html files?
RequireJS text plugin (https://github.com/requirejs/text) needs files with .html extension. It seems that the .html requirement cannot be changed.
My html files are located in the web folder of my ...
1
vote
0
answers
332
views
Testing Backbone with JSDOM
I'm trying to figure out how to test backbone using jsdom and nodeunit as the testing framework.
I've got the error: "Error: Calling node's require("text") failed with error: Error: Cannot find ...