             when 'object'
                 if React?.isValidElement(file_content)
                     output_content = React.renderToStaticMarkup(file_content)
-                    output_content = "<!doctype html>#{ output_content }"
+                    output_content = "<!doctype html>#{ output_content }" unless options.fragment
                     return ['text/html', output_content]
 
                 # It looks like a React component but somehow React wasn't

            file_path = path.join(config.ROOT_PREFIX, file_path)

        output_path                     = _processPath(file_path)
        [output_type, output_content]   = _processContent(file_content)

        if options.content_type
            output_type = options.content_type

    if fs.existsSync(path.join(project_react_path, 'package.json'))
        React = require(project_react_path)

    _processContent = (file_content, options={}) ->
        switch typeof file_content
            when 'string'
                return [null, file_content]
