Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Map configuration in almond builds #159

Open
pascalw opened this issue Apr 15, 2014 · 1 comment
Open

Map configuration in almond builds #159

pascalw opened this issue Apr 15, 2014 · 1 comment

Comments

@pascalw
Copy link

pascalw commented Apr 15, 2014

Hi @jwhitley,

first of all thanks for your work on this project, it's been working great for me.

One thing I'm having trouble with though is using map in almond builds.

This is my requirejs.yml:

shim:
  zepto:
    exports: '$'

map:
  '*':
    jquery: 'zepto'

In development this works a treat, but if I create a production build with config.requirejs.loader = :almond set, I get a javascript error saying "backbone missing jquery".

Now I noticed that during development the requirejs_include_tag generates a requirejs runtime config based on requirejs.yml. It appears that it doesn't include this in the almond single file build, is that how it's supposed to work?

If I add the map config to my javascript manually like so it works:

c = {"map":{"*":{"jquery":"zepto"}}}
require.config(c)

Please let me know if you need any more information.

@carsomyr
Copy link
Collaborator

@pascalw Sorry for the belated reply. I am currently looking adding config information for almond.js builds. The cause of the issue is that the config information isn't populated in the first place.

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

No branches or pull requests

2 participants