Created
July 20, 2013 04:56
-
-
Save jstrimpel/6043926 to your computer and use it in GitHub Desktop.
requirejs config getting destroyed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// server start up | |
var requirejs = require('requirejs'); | |
requirejs.config({ | |
paths: {}, // bunch of paths | |
baseUrl: 'dirpath' | |
}); | |
// request handler | |
// http request - much more going on here, but this is basically what happens | |
requirejs.optimize({ baseUrl: 'anotherdirpath', paths: {} }, function () { | |
// optimizes sucessfully | |
request.reply(); // respond to request | |
}); | |
// config set in server startup is now gone. all future require's break. :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment