Nowadays, more and more web developers use modules when coding javascript. It’s a nice way to organise files and share your work with community.

But, for people who don’t use it everyday, all terms and librairies can be confusing: CommonJS, RequireJS, ES6 Module, AMD, Browserify, SystemJS, Webpack,… WTF!

So, for me and for developers a bit lost about that, I did this diagram:

[Note that I didn't add link between ES6 Module loader and SystemJS who use it for a better visibility]

Hope it can helps some of you and tell me if I’ve made mistakes.


When adding meta tags using SonataSeoBundle directly from your config.yml:

                keywords:    'été, plage'
                description: 'Un été à la plage!''

Or in your controller for a specific route:

$this->container->get('')->addMeta('name', 'keywords', "été, plage");
$this->container->get('')->addMeta('name', 'description', "Un été à la plage!");

Accented characters outputs html special characters due to htmlentities call inside the twig extension:

<meta name="keywords" content="&eacute;t&eacute;, plage" />
<meta name="description" content="Un &eacute;t&eacute; &agrave; la plage!" />


To prevent that, you have to override SeoExtension twig extension with your own like this:

    class: MyCompany\Bundle\AppBundle\Twig\Extension\SeoExtension
    arguments: ["", "UTF-8"]
    public: false
        - { name: twig.extension }
namespace MyCompany\Bundle\AppBundle\Twig\Extension;

use Sonata\SeoBundle\Seo\SeoPageInterface;
use Sonata\SeoBundle\Twig\Extension\SeoExtension as BaseSeoExtension;

class SeoExtension extends BaseSeoExtension
    public function getMetadatas()
        $html = '';
        foreach ($this->page->getMetas() as $type => $metas) {
            foreach ((array) $metas as $name => $meta) {
                list($content, $extras) = $meta;

                if (!empty($content)) {
                    $html .= sprintf("<meta %s=\"%s\" content=\"%s\" />\n",
                } else {
                    $html .= sprintf("<meta %s=\"%s\" />\n",

        return $html;

    private function normalize($string)
    	return str_replace( '"', "'", strip_tags($string) );

Keywords meta tag is useless nowadays