Skip to content

Instantly share code, notes, and snippets.

@jstrimpel
Created July 20, 2013 04:56
Show Gist options
  • Save jstrimpel/6043926 to your computer and use it in GitHub Desktop.
Save jstrimpel/6043926 to your computer and use it in GitHub Desktop.
requirejs config getting destroyed
// 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