[Answer]-Correct use of REQUIRE_BASE_URL with django-require

1πŸ‘

βœ…

In my experience, RequireJS works a lot better if all main scripts (as would be set as data-main on the requirejs script tag), are in the root of the baseUrl.

So, in your case, I’d use all the default settings for django-require, and then just set REQUIRE_BUILD_PROFILE.

I’d then place all your data-main scripts in the root of your js folder.

The author of RequireJS actually recommends keeping the folder structure very simple for RequireJS projects.

http://requirejs.org/docs/api.html#jsfiles

πŸ‘€Dave

Leave a comment