r.js Questions
3
Solved
I use r.js optimizer to combine js files based on build profile as it's suggested in documentation. Here's my build-config.js:
({
baseUrl: ".",
paths: {
jquery: '//ajax.googleapis.com/ajax/libs...
Gnu asked 25/8, 2013 at 6:33
4
I am optimizing several js files into one using r.js. It works fine before. Recently,I modified some js code, add the code as:
var x = 08;
then it shows
ERROR:parse error using esprima for f...
Kinkajou asked 1/11, 2013 at 1:20
2
Solved
There's gulp-requirejs plugin, but it's blacklisted with the following message: "use the require.js module directly".
The docs are quite sparse, how would I best use it in conjunction wit...
1
I am learning to use r.js to optimize/minify/uglify a front-end app. So far it is really cool and promising, but I am trying to figure out how to do one thing. I want to able to concatenate all the...
Costard asked 1/7, 2015 at 4:5
5
Solved
I have multiple pages on a site using RequireJS, and most pages have unique functionality. All of them share a host of common modules (jQuery, Backbone, and more); all of them have their own unique...
Suffruticose asked 11/6, 2013 at 2:22
2
Solved
I'm attempting to build a SPA application (requirejs, durandal 2, knockout) into a single main-build.js file using grunt, and I'm running into serious issues with the 'text' plugin that durandal is...
1
Solved
I'm trying to understand the benefits of the popular r.js.
It seems to...
concatenate a list of manually selected JavaScript files
uglify/minimize that combined code
do some similar stuff for CS...
Apron asked 6/10, 2014 at 20:7
4
Solved
I have followed the basic tutorials (results in one file after you run r.js)
The problem is, my main.js file at the end is 500KB. That's too big. I want to split it into two files.
I want to opti...
Octane asked 2/4, 2014 at 20:40
1
Solved
I am trying to build a stand alone module with almond and this is my setup. The question is at the bottom.
Abbreviated directory structure is:
|-static
|-core
|-js
|-require.js
|-almond.js
|...
Chilly asked 14/3, 2014 at 21:38
0
When following the general setup of example-multipage provided in the docs the common.js module seems to cause dependencies to make async XMLHttpRequest calls.
my directory structure is:
|-static...
Orville asked 12/3, 2014 at 7:20
1
Solved
My page includes several components that exist as separate AMD modules. Each of these components is turned into a single file by the Require.js optimiser. Because several of these components share ...
Stableman asked 25/2, 2014 at 20:32
1
Solved
im trying to figure out if its a good idea to use r.js from require.js to generate a build.js file out of my javascript files to only load one file on production.
But im wondering if this is a good...
1
Most examples for RequireJS setup, place the configuration object in the main.js entry point, something like this:
//main.js
require.config({
"paths": {
//libs
"lib1": "assets/js/lib/lib1",
"li...
Crissie asked 3/10, 2013 at 21:49
1
Solved
Here is (part of) my folder structure:
node-test
bower_components
build
public
main.js
build.js
Running the optimizer with r.js -o build.js and the following configuration works fine:
// m...
Equidistant asked 3/7, 2013 at 19:15
2
Solved
Is there a way to define a module that "dynamically" load other modules in RequireJS? If yes, how the optimizer (r.js) understands how/when a module has to be included?
For example, let dynModule...
Marabout asked 3/7, 2013 at 11:33
1
In my grunt.js file I've got
requirejs: {
dist: {
options: {
almond: true,
wrap: true,
modules: [{name: 'main'}],
mainConfigFile: "src/js/main.js",
baseUrl: "src/js",
dir: "tmp/js",
inlin...
1
Solved
I am looking for a way to prevent r.js (RequireJS' optimization script) from ugylyfying our JS-modules to maintain readability for debugging purposes.
I expect the script (running on Node.js by the...
Cleaves asked 18/3, 2013 at 5:55
1
© 2022 - 2024 — McMap. All rights reserved.