Skip to content
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

How to skip css! references in r.js builds? #204

Open
tangst opened this issue Oct 29, 2015 · 1 comment
Open

How to skip css! references in r.js builds? #204

tangst opened this issue Oct 29, 2015 · 1 comment

Comments

@tangst
Copy link

tangst commented Oct 29, 2015

I'm using grunt-contrib-requirejs, which packages r.js. The site I work on has wrapped the css.js file into a define module into the the global space. So, simply referencing

require(["css!some_file"],function(){}) 

works fine when you just use it inline without doing an r.js build and upload the file.

However, when trying to do a r.js build, I get the usual "Cannot read property 'normalize' of undefined" message. Is there a way to tell r.js that when it sees css! to ignore it for the build? I've tried

require.config({
   paths: {
     "css": "empty:"
   }
});

but that doesn't work.

@edwinfound
Copy link

I have the same problem, do you have fixed it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants