Questions tagged [requirejs-optimizer]

The requirejs-optimizer is part of the r.js adapter for Node and Rhino, and it is designed to be run as part of a build or packaging step after you are done with development and are ready to deploy the code for your users.

The is part of the r.js adapter for and , and it is designed to be run as part of a build or packaging step after you are done with development and are ready to deploy the code for your users.

has an optimization tool that does the following

  • Combines related scripts together into build layers and minifies them via UglifyJS (the default) or Closure Compiler (an option when using Java).
  • Optimizes by inlining CSS files referenced by @import and removing comments.

Home Page: http://requirejs.org/docs/optimization.html

85 questions
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
1 answer

Is RequireJS optimization only applicable to scripts that reside on the same server?

About half of the scripts that I use are on CDN and the other half are on the same server as the app. I don't know what to optimize in this case. Can somebody suggest?
SBel
  • 3,315
  • 6
  • 29
  • 47
0
votes
0 answers

Using RequireJS in a multipage application

we have a multipage application with below structure: ApplicationModule is the root folder that contains all application logical modules,like Usermanagement and others like below: /ApplicaationModules/UserManagement //inside userManagement folder we…
0
votes
1 answer

Require.js (almond.js) Timing Off

I'm trying to use Almond.js and the Require.js optimizer to make a standalone file that can be used without Require.js. I've been able to successfully compile the file, and all the code runs, but there's one problem: the code executes in the wrong…
machineghost
  • 33,529
  • 30
  • 159
  • 234
-1
votes
1 answer

Require js optimizer minifying my project but not concatenating into bundled file

It's not clear to me how to bundle many js files into one file. When I run the optimizer the result is an output directory with a structure mirroring my source directory. All files in it are minified. That's good. But what I was looking for was…
Robert
  • 828
  • 2
  • 13
  • 28
-1
votes
2 answers

requirejs and pre-built bundles

I can't get bundles to work in the optimized build, I'm trying to load some external pre-built bundle (not included in the require build process output). In requirejs.config: paths: { 'mymodules': '../lib/test-bundle/test-bundle' }, bundles: { …
Alex
  • 3,264
  • 1
  • 25
  • 40
-1
votes
1 answer

Exclude shim from require js optimized build

I've a durandal WebApp which uses require js to load modules. There's a shim configured for tinymce. It works OK when using the non-optimized version. When I use r.js to optimize the code, I want to exclude tinymce from the bundle, but it's always…
pevgeniev
  • 389
  • 2
  • 13
-1
votes
1 answer

requireJS optimzer (r.js) generate code with exception

I am trying to 'optimze' my requireJS/Backbone project I succeeded running r.js under node environment, the problem is the output from the r.js compiler throws 'unexpected identifier' index.html has the following
Adi Darachi
  • 2,137
  • 1
  • 16
  • 29
-2
votes
1 answer

RequireJS optimization with define functions

I want to build my project to one file. I have three files. test2.js: define( 'test2', ['test3.js'], function (t2) { // test 2 } ); test3.js: define( 'test3', [], function () { // test 3 } ); and main file…
-2
votes
1 answer

Requirejs optimizer and mainConfigFile errors

I am attempting to run r.js against our webapp, but am running into the following error: Error: Error: The config in mainConfigFile /home/ubuntu/dev/proj/web/insight/js/main.js cannot be used because it cannot be evaluated correctly while running…
mahle
  • 233
  • 1
  • 2
  • 13
1 2 3 4 5
6