public function collectConfigs()
    {
        if (!$this->collectedConfig) {
            $config = $this->config;
            foreach ($this->bundles as $bundle) {
                $reflection = new \ReflectionClass($bundle);
                if (is_file($file = dirname($reflection->getFileName()) . '/Resources/config/requirejs.yml')) {
                    $bundleConfig = Yaml::parse(file_get_contents(realpath($file)));
                    $config = array_merge_recursive($config, $bundleConfig);
                }
            }
            $this->collectedConfig = $config;
        }
        return $this->collectedConfig;
    }