In my last post, I outlined a method that can be used to develop compilable-ExtJS 4 applications, with minimal configuration, that leverage a common, global location for shared assets and libraries. This approach works fine if you are merely “compiling” the application (e.g., only the JS part). However, if you do the full “build” you’ll quickly run into a number of issues.

The most significant of the issues is that the full build process will attempt to compile the theme for your app via the compass compile command. Since our approach decouples the app from the library, AND because we didn’t exactly deal with the SASS/theme bits whatsoever, the errors just roll and roll when building the app.

Fortunately, the fix is pretty easy. In the following, I’ll outline some necessary pre-requisites you’ll need to get setup before building, and then I’ll suggest a few options for how to do this.

Another Virtual Directory

Since we’re primarily interested in styles–particularly images–we need another virtual directory that will point to the images for our theme.

In httpd.conf, I’ve added the following:

Alias /sencha/testapp/resources/images "/Users/{username}/sencha/extjs/resources/themes/images"

NOTE: If you are developing your own custom theme that will be app-specific, you can skip this step and just put the theme images in More >