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

Config variables are evaluated on write #81

Open
farism opened this issue Apr 28, 2014 · 1 comment
Open

Config variables are evaluated on write #81

farism opened this issue Apr 28, 2014 · 1 comment

Comments

@farism
Copy link

farism commented Apr 28, 2014

My requirejs config looks as such:

requirejs.config({
    urlArgs: 'v=' + (new Date().getTime())
});

However, when I run bower-requirejs I end up with a config that has an evaluated urlArgs option. I haven't looked deep in the source (I assume stringify is being used somewhere) but I did notice that there was a comment to perhaps change writeConfig to mergeConfig. Anyone have thoughts on how this may be accomplished?

@florianv
Copy link
Contributor

It cannot be easily changed as bower-requirejs depends on the requirejs parser, that evaluates the config when parsing it. Changing it will likely require a lot of overrides making this library harder to maintain.

A solution could be to separate the generated config from the one with variable properties to prevent them from being evaluated (see #38).

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