You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build requirejs project with grunt-contrib-requirejs and almond, but somehow r.js includes require.js in bundle and it tries to load all my dependencies from external files.
I believe 'app' would belong in the include array property. I've never used an explicit deps property in grunt-contrib-requirejs nor in the root section of requirejs.config. It should go inside a certain shim, in case you need one.
Also, your folder structure is not evident. Why is almond two folders above the gruntfile?
Thank you, now it looks like it's not trying to load any modules from external files. But now I got an error about missing module, but I'm able to find that module by name. Modules are defined like this:
define([/*dependencies*/], function (/*args*/) {...
and r.js correctly transform this definitions to
define(moduleName, [/*dependencies*/], function (/*args*/) {...
I've deleted deps property from main.coffee and gruntfile and modified include property as you advised to
include: ['../../vendor/js/almond', 'app']
About paths, almond is 2 folders above defined root (src/tmp/js), not gruntfile. And it's because in src/tmp/js there are compiled coffee and cjsx files and in src/vendor/js are javascript libs.
I'm trying to build requirejs project with grunt-contrib-requirejs and almond, but somehow r.js includes require.js in bundle and it tries to load all my dependencies from external files.
Gruntfile part:
main.coffee looks like this:
Require.js is not included by myself anywhere. Am I missing something? Thanks for any help.
The text was updated successfully, but these errors were encountered: