My build process combines every application script and vendor lib into one single .min.js-file. Now, let's say one of this vendor libs is jQuery. My application will run in an environment where jQuery is already used. So I don't need to include…
I keep seeing this error when executing the compiled file:
Uncaught Error: No json
Here's my current requirejs grunt task configuration:
requirejs: {
options: {
baseUrl: "build/repos/staging/dev",
mainConfigFile:…
Grunt has suddenly stopped building correctly locally. It's not building assets that are served by Angular, and the console is giving the following message:
Uncaught Error: inc/../../../common/js/sv-common missing…
I have a project with multiple javascript files, all formatted as AMD modules. I'm using r.js as part of my build process (using this grunt plugin to handle everything).
After I build my project, I end up with a concatenated, minified file that has…
I have a Typescript project:
myproject
|
+-src (folder)
| |
| +-main.ts
| +-stringHandler.ts
| +-disposable.ts
+-out (folder)
| |
| +-...
+-Gruntfile.js
In my Grunt configuration I have a 2-step task which compiles all .ts files in…
I have a project, that consists of multiple apps with the following structure:
project
|-node_modules
|-common
|-public
|-js
|-vendor
|-almond.js
|-require.js
|-underscore.js
…
I am building a library which is a set of folders containing Model View Controller Javascript files.
Each files has dependencies declared using require syntax:
define([
'modules/moduleA/src/moduleAModel',
…
After a long development, I decided it was time to ship an optimized/bundled version of the JS in our project. So having used requirejs since the beginning, I thought it would be as simple as doing grunt build. Evidently, I was wrong and I spent a…
When I want to debug my requirejs app, I need to reference my application everytime with something like:
var App = require('app');
as stated here:
http://requirejs.org/docs/api.html#modulenotes
From that moment I can access everything via console…
I am using requirejs optimizer (r.js) through grunt and here is my requirejs config :
requirejs.config
baseUrl: '/scripts'
locale: window.localStorage.getItem('locale') || null
...
The thing is that the grunt r.js plugin…
I am trying to get up and running with the grunt-contrib-requirejs task.
Being new to RequireJS in general and having never used the optimizer/r.js, I am really confused how to get this to work.
As a start, I have set up a simple directory…
In Gruntfile.js for grunt-contrib-requirejs I can only register one task and I can only have one output file i.e. home_scripts.pack.js. However, I want to have as many as I want output files based on different 'include' criteria. For example,…
I have a large amount of js files in my website which on minification and uglification using grunt-requirejs plugin gives a single file of size 1.6 MB. Loading this file on slow internet connection gives requiejs timeout error.
Uncaught Error: Load…
For example, both grunt-contrib-requirejs and grunt-requirejs provide a task called requirejs. What will happen if I installed two plugins? Which plugin will be used to run the task?