Web application with backbone.js and requirejs packages, requirejs optimizer
Date : March 29 2020, 07:55 AM
|
Is there a YUI3 Optimizer similar to RequireJS Optimizer?
Date : March 29 2020, 07:55 AM
To fix this issue A quick way to do this (for core YUI modules) is the YUI Configurator: http://yuilibrary.com/yui/configurator/ -- this will build you two minified rollup files for all the base JS and CSS you need. The core team is working on a tool called "Grifter" that will do the same thing, but also handle non-core modules.
|
How can i use the RequireJS optimizer to optimize my app to not use RequireJS anymore?
Date : March 29 2020, 07:55 AM
To fix the issue you can do Are you trying to load the file in the script tag w/o using data-main + require.js? OR, are you trying to render the file so that RequireJS is no longer used at all? I suspect it's the latter, which is not possible. If the former, that is achieved by bundling Require in via a build file option: http://youtu.be/m6VNhqKDM4E?t=12m44s
|
How to use Requirejs-handlebars with Grunt-contrib-requirejs optimizer?
Date : March 29 2020, 07:55 AM
it fixes the issue It seems grunt requirejs doesn't inline the handlebars.runtime module, which is why you had to add that remote route for it in your express code. I managed to fix it by declaring paths for both handlebars and handlebars.runtime and I also had to shim them. So, my main.js looks something this: paths: {
'handlebars.runtime': '../bower_components/handlebars/handlebars.runtime',
handlebars: '../bower_components/handlebars/handlebars',
hbs: '../bower_components/requirejs-handlebars/hb',
},
shim: {
'handlebars.runtime': {
exports: 'handlebars.runtime'
},
handlebars: {
deps: ['handlebars.runtime']
},
}
|
Module injection problems when combining requirejs bundles and requirejs optimizer
Date : March 29 2020, 07:55 AM
Hope this helps Alright, I figured that probably noone will read through all this, and I just noticed that I could have pointed out the real problem much better. (It was that app_mini and angular were undefined by the time they got injected into testservice) So the problem was just that I completely missed to pass in the shim config, which allows require js to wrap angular and jquery into AMD modules. Because that was missing, angular could never be found, which broke app_mini as well as testservice and therefore also the whole app. modules: [
{
name: 'scripts/vendor',
exclude: [],
override: {
{
paths: {
'angular': 'bower/angular/angular',
'jquery': 'bower/jquery/dist/jquery'
},
shim: {
angular: {
exports: 'angular',
deps: ['jquery']
}
},
bundles: {
}
},
}
},
|