Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Meteor with Requirejs

How can I integrate requirejs in a meteor app and use AMD–modules, e.g for my Backbone modules? Has anybody done that and can tell me what steps are needed to get this working?

like image 373
treppo Avatar asked Dec 19 '12 21:12

treppo


1 Answers

One simple answer (though maybe not the one you're looking for) is that you can simply use the two independently. In other words, load all of your meteor scripts, then start your require-ified scripts loading. Your require-ified scripts will be able to use the Meteor stuff just fine, without having to "import" any of it in via Require's loader.

If you want to have to import it, you should instead create a Require "shim" for it.

like image 98
machineghost Avatar answered Nov 10 '22 05:11

machineghost