How to specify which Require.js modules are compressed with the optimizer and which are not?

Using the Require.js optimizer with Node.js, I only want to compress some of my project files. How do I specify which files I want compressed? This is my current node.js script:

var requirejs = require('requirejs');

var config = {
baseUrl: '/common',
name: 'main',
out: '/compressed'
};

requirejs.optimize(config, function (buildResponse) {
//buildResponse is just a text output of the modules
//included. Load the built file for the contents.
//Use config.out to get the optimized file contents.
var contents = fs.readFileSync(config.out, 'utf8');
});

I just want to compress the files in common. Main is also in common. There are files outside of common that are dependencies that I do not want to compress. How does the optimizer choose what files to combine?

I don't think the Require.js build system works that way; it's sort of an all-or-nothing operation. From the site (http://requirejs.org/docs/optimization.html):

The build system will then trace the dependencies for main.js and inject them into the appdirectory-build/scripts/main.js file.

However, there are a large number of options that you can provide:

https://github.com/jrburke/r.js/blob/master/build/example.build.js

and based on that it looks like your best bet is to mark the modules you don't want as "stub" modules. From the page:

Specify modules to stub out in the optimized file. The optimizer will use the source version of these modules for dependency tracing and for plugin use, but when writing the text into an optimized layer, these modules will get the following text instead