   mod = config.modules
   normalized.modules = {}
   sourceURLs = mod.addSourceURLs and not config.optimize
-  normalized.modules.wrapper = normalizeWrapper mod.wrapper, sourceURLs
+  normalized.modules.wrapper = normalizeWrapper mod.wrapper, sourceURLs, config.modules.nameCleaner
   normalized.modules.definition = normalizeDefinition mod.definition
   normalized.conventions = {}
   Object.keys(config.conventions).forEach (name) ->

  new SourceNode 1, 0, null, code.split('\n').map (line, index) ->
    new SourceNode index + 1, 0, source, (line + '\n')

exports.cleanModuleName = cleanModuleName = (path) ->
  path
    .replace(new RegExp('\\\\', 'g'), '/')
    .replace(/^app\//, '')

commonJsWrapper = (addSourceURLs = no) -> (fullPath, data, isVendor) ->
  sourceURLPath = cleanModuleName fullPath
  moduleName = sourceURLPath.replace /\.\w+$/, ''
  path = JSON.stringify moduleName


  modules              = config.modules      ?= {}
  modules.wrapper     ?= 'commonjs'
  modules.definition  ?= 'commonjs'
  modules.nameCleaner ?= (path) ->
    path.replace(new RegExp('^' + sysPath.relative(paths.root, paths.app) + '/'), '')

  config.server       ?= {}
  config.server.base  ?= ''
