-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
requirejs ignoring my mainConfigFile #78
Comments
@starangelam had any luck with this issue since you filed it? |
@bencevans No, unfortunately. I posted in stackOverflow as well. But no insight offered yet. http://stackoverflow.com/questions/19415369/grunt-requirejs-ignores-paths-from-my-mainconfigfile |
@starangelam That's a shame, I'm having a look around for working examples. This one seems to be using the mainConfigFile ok... https://github.com/neoziro/bootstart |
@bencevans I think I should clarify that this gruntFile was working when I had this setup for mainConfigFile: main.js
|
I had the same project setup and error and found the cause. r.js won't recognize RequireJS configs in the file referenced at I've created a patch (actually two). I could provide diffs to fix r.js. I'm currently trying to build and write tests for r.js to incorporate my patch. I'll create an improvement issue these days. |
Uh. It's more complicated contributing to r.js than I thought. Tests of the latest release are failing ony my system. Unable to post proposals on the mailing list (post deleted?). Required to sign a CLA for more than two changed lines of code? (I know: maybe even 5 or 10 lines might not require a CLA, but it looks quite bureaucratic). The only workaround I could recommend is the approach we used in another project: Do not use main.js
Gruntfile
I'll go with this way (workaround) at first. Actually I started implementing the code and Grunt this way at first then finding |
Project Intro
My project is a single page storefront. The project has multiple modules, and each module contains a set of controller.js, view.js and model.js files, as well as a template.html file. And uses requirejs to manage dependencies.
Problem Statement
I want to use mainConfigFile to provide paths to reference modules in grunt-requirejs.
Part of my mainConfigFile's require.config is stored in separate file (base.dependency.config), and require.config.paths are pieced together by underscore at runtime.
base.dependency.config
main.js
Error
However, grunt requirejs is ignoring mainConfigFile, grunt requirejs tries to find 'app.js' under root, when in fact, 'app' is defined under require.config paths as
my gruntFile:
my file structure
The text was updated successfully, but these errors were encountered: